He joined the Royal Navy at age eleven. He saw action in the Dutch East Indies, and was part of the force that captured and burnt Washington, D.C. during the War of 1812. He took part in the bombardment of Algiers. In the post-Napoleonic period he was stationed off South America, involved in diplomatic duties during the various wars of independence. He then spent several years off the coast of West Africa as part of the flotilla engaged in the suppression of the slave trade. He also saw duty in the North Atlantic, the West Indies and the Mediterranean Sea. He was eventually given command of his own ship, the steam frigate . However, in 1837 he was passed over for promotion, so, recognising that his career was going nowhere, he resigned from the Navy in 1841.