He entered the Royal Navy as a midshipman in 1779. He served in the West Indies from 1779 to 1783, seeing action in the Caribbean during the American Revolutionary War and in Lord Howe's final relief of the French and Spanish siege of Gibraltar in 1782. From 1783 to 1793, he served in the East Indies. Promoted to commander, he defeated a French division off Puerto Rico on 5 June 1795, and, in 1796, he participated in the capture of the Dutch colonies of Demerara, Essequibo and Berbice, becoming the British governor of Netherlands Guiana. He continued to fight against the French in Santo Domingo, from 1797 to 1799, losing his ship HMS "Pique" but capturing the French frigate "Seine" at the Action of 30 June 1798 and, in 1800, he captured the French frigate "La Vengeance" off the coast of Africa.