Carnegie entered the Royal Navy in 1771 on board the third-rate HMS "Albion". Subsequently he served on the frigate HMS "Southampton" in home waters, where he assisted in transporting the Queen of Denmark across the English Channel, and in the post ship HMS "Squirrel, in which he sailed for Jamaica in 1774 while still a midshipman. In early 1777 he was made an acting lieutenant in HMS "Nonsuch" before being confirmed as a lieutenant on 7 December in HMS "Apollo" on the North American Station. Carnegie served on "Apollo" for just under two years before joining the flagship of Rear-Admiral Sir John Lockhart-Ross, the ship of the line HMS "Royal George". In "Royal George" he joined the fleet of Admiral Sir George Rodney sent to relieve the siege of Gibraltar. On their way towards Gibraltar the fleet fought the action of 8 January 1780, where they captured a large Spanish convoy. Carnegie subsequently participated in the Battle of Cape St. Vincent on 16 January which cleared the way for the British fleet, allowing them to successfully reach Gibraltar on 25 January.