He entered the Royal Naval College at Portsmouth in 1810, and in 1813 was appointed midshipman on the 38-gun . He saw action in the War of 1812, taking part in operations under Sir George Cockburn and Lieutenant Philip Westphal. In October 1814 he joined the 38-gun , with whom he went to Greenland to search for the American Commodore John Rodgers. He later transferred to the 74-gun , then the 98-gun , and finally the 100-gun . After passing his Navy examinations in May 1816, he was involved in the Bombardment of Algiers. From 1816 to 1818, Rivett-Carnac served as an admiralty-midshipman on the , and later on the . On he was promoted to lieutenant in the . In January 1819 he joined the , and in November 1821 transferred to the . He served on that ship until August 1825, when he was transferred to the . On 23 January 1826, John Rivett-Carnac joined under Captain (later Admiral Sir) James Stirling as First Lieutenant. Three months later he married Maria Jane Davis, daughter of EIC director and orientalist Samuel Davis at St. Marylebone, London.