Robertson was commissioned lieutenant on 22 June 1773 by Commodore Molyneux Shuldham, the commander-in-chief at Newfoundland, and in that rank he reportedly commanded the cutter Placentia on that station until July 1775
He was promoted commander on 9 February 1778, being appointed to the Weazle 16 which went out to the Guinea Coast in the autumn before proceeding to the Leeward Islands where she landed gold dust at Antigua. On 13 January 1779, whilst carrying dispatches from Rear-Admiral Hon. Samuel Barrington to England announcing that the island of St. Lucia had been taken, the Weazle was pursued for nine hours before firing two broadsides and then surrendering to the French frigate Boudeuse 32 off St. Eustatius, following which she was carried into Guadeloupe.
Upon being exchanged Robertson returned to England, and from 20 October until 6 November 1779 he apparently commanded the Ostrich 14 before transferring to the sloop Fortune 14, which he fitted out for the Leeward Islands. Sailing for the Caribbean from Cork in January 1780 with the escort for the trade, he again suffered the misfortune of being captured when the frigates Iphigénié 34 and Géntille 40 ran him down off Barbuda on 26 April after he had mistaken the French fleet for the British fleet, a circumstance that led to the conclusion that the French had obtained the British signal codes.
After a long period as a prisoner-of-war, and having apparently been taken to France, Robertson arrived at Weymouth aboard a cartel in late January 1782 with the officers and men of the Fortune. In March he was appointed to the sloop Swan 14, a new vessel which completed her coppering and fitting at Plymouth in May and sailed for Ireland. She left Cork on 27 June and arrived at Plymouth on 10 July with a convoy of tenders carrying seamen from Cork and Waterford, and on 24 July she arrived back at Cork where on 5 August she was reported as being ready to take a convoy to Plymouth. Sadly, Robertson completed his hat-trick of losses when the Swan capsized off Waterford on 16 August in a sudden gust of wind, with initial reports stating that all one hundred and thirty men had been lost together with forty volunteers. It was later established that Robertson was among just sixteen men, including the Swans’ lieutenant, master and boatswain, who had survived by escaping in the jolly boat to Cork.
Robertson did not see any further employment in the American Revolutionary War but was posted captain on 30 December 1782 of the Resource 28 for purposes of rank only.
At the beginning of January 1793 he recommissioned the thirty-five year-old frigate Alarm 32, which on 14 February made the signal for a convoy in Plymouth Sound prior to putting out two days later for Cork. She returned to Plymouth with a merchant convoy from Dublin and Belfast before ferrying impressed seamen from the Downs to Spithead at the beginning of April, and towards the end of the month she captured the French privateer Enfant de la Patrie 6 with the assistance of the revenue cutter Swallow, which vessel was sent into Portsmouth. A further capture, after a chase of five hours, was the schooner privateer Chauvelin 10, which she brought into the Downs at the beginning of May.
Thereafter Robertson suffered the monotony of regular convoy duty, sailing for Ireland at the beginning of June where he and his officers were royally entertained to a banquet at Dublin, and then departing with another convoy for England to arrive in the Downs on 24 July. At the beginning of August the Alarm arrived at Portsmouth with a large convoy from the Downs, whereupon she was briefly sent in an unsuccessful pursuit of two French privateers that were rumoured to be off Beachy Head. She then went around to Plymouth to collect convoys for Bristol, Liverpool, Wales and Ireland, and she brought another convoy back from Ireland to the Downs in September. Once more she performed Irish convoy duty in October, escorting twenty transports carrying troops to arrive at Plymouth at the end of the month, on 4 December she sailed from that port with a convoy, and later that month she was at Cork where having pressed some men out of a West Indiaman she was obliged to perform quarantine.
In March 1794 the Alarm sailed for the Leeward Islands to join Vice-Admiral Sir John Jervis’ campaign, and in May Robertson transferred to the Veteran 64, flying the broad pennant of Commodore Charles Thompson. In this capacity he led a naval brigade in the landings on Grand Terre, Guadeloupe on 19 June, but he was killed along with six other men on 2 July in the unsuccessful attack on the heights above Pointe à Pitre.
He left a widow and infant child.
Jervis said of Robertson that ‘he had long been a child of misfortune, although he possessed talents to merit every success and prosperity’.