While living in Philadelphia as a young man, he became affiliated with the Philadelphia Light Horse. Throughout the years he became more active with the Pennsylvania Militia, and, at the outbreak of the War of 1812, he was appointed Colonel of the 62nd Pennsylvania Reserves. He led the regiment in support of the Erie Campaign and the Battle of Lundy's Lane; he was among the defenders at the Battle of Baltimore and witnessed the disastrous Battle of Bladensburg and the subsequent burning of Washington, D.C. He remained active with the Militia after the war, eventually rising to the rank of Major General.