 He studied law, was admitted to the bar on June 21, 1811, and commenced practice in Philadelphia.He served as a first lieutenant and regimental adjutant in the First Pennsylvania Militia Volunteers during the War of 1812.At the close of the war he went into partnership with James Buchanan, who became the 15th President of the United States, and continued the practice of his profession in Philadelphia.