 He served during the American Revolutionary War as a lieutenant in the 3rd Continental Light Dragoons, and was wounded at Eutaw Springs on September 8, 1781.He transferred to Baylor's dragoons on November 9, 1782, and later served as a lieutenant in the Second Artillerists and Engineers, beginning on June 5, 1798 and ending with his resignation on November 15, 1800.He also served in the War of 1812

Stuart was elected as a Federalist to the Twelfth and to the three succeeding Congresses, serving from March 4, 1811 to March 3, 1819.