Joining the Navy in 1800, he was serving as midshipman in frigate Philadelphia when it was stranded and captured at Tripoli, October 1803, and as a member of the crew was held prisoner for three years until peace was declared.
In 1814–15 as commander of naval forces at New Orleans, he cooperated with General Andrew Jackson in the defense of that city, for which he received the thanks of Congress.
Promoted captain, he commanded frigate Constitution 1825–28, served as Navy Commissioner 1828–32, commanded the Navy’s Mediterranean Squadron 1832–36, and then served as Commandant of the Washington Navy Yard until his death 25 August 1839 at Wilmington, New Jersey.