At the age of sixteen he was appointed a
midshipman 16 March 1798. The Department of Navy had just been created by Congress in response to increasing attacks on merchant ships. He served on
USS Constellation when she captured the
French frigate Insurgente on 1 February 1799, and after serving on
USS Constitution in the
Mediterranean, commanded the
schooners
Nautilus and
Scourge in
Preble’s squadron during the
First Barbary War, taking part in the attacks on
Tripoli. He was in command of
Hornet from 1806 to 1809. During the
War of 1812, he was senior officer in charge of U.S. Naval affairs in
Charleston, South Carolina.
Dates of ranks • Midshipman, 16 March 1798 • Lieutenant, 11 July 1799 • Master commandant 5 September 1804 • Captain 29 December 1811 == Personal life ==