He entered the Royal Navy College in February 1809. He was serving as a midshipman on HMS Leander under Captain Edward Chetham and was present at the Battle of Algiers in August of 1816. A month later he was promoted to Lieutenant and moved to the much smaller HMS Scout under Captain William Ramsden based in the Mediterranean. In March 1823 he was placed on HMS Larne under Captain Frederick Marryat on a trip to the East Indies. There in May 1824 he caught "jungle fever" on an expedition to resolve water supply to Rangoon with a fleet assembled at Port Cornwallis on the Great Andaman Island.