Born near Lexington, Kentucky, Stuart graduated from Centre College, Danville, Kentucky, in 1826. He then studied law, was admitted to the bar in 1828, and commenced practice in Springfield, Illinois. He was a major in the Black Hawk War in 1832, where he first met Abraham Lincoln.
He served as member of the Illinois House of Representatives between 1832-1836. Stuart encouraged Lincoln to study law and the two subsequently became law partners, between 1837 and 1841.
Stuart was an unsuccessful candidate for election in 1836 to the Twenty-fifth Congress. He was, however, elected as a Whig to the Twenty-sixth and Twenty-seventh Congresses (March 4 1839-March 3 1843), winning over Stephen Douglas in 1838. He was not a candidate for renomination in 1842.
He served as member of the Illinois Senate between 1848-1852. He was the unsuccessful Constitutional-Union candidate for Governor of Illinois in 1860.
Stuart was a favorite cousin of Mary Todd Lincoln and as a member of Congress after his election in 1862 over Republican Leonard Swett was a frequent visitor at the White House even though he was an anti-emancipation Democrat.
He was defeated in 1864 by Republican Shelby Moore Cullom, a Lincoln ally.
Following his defeat in 1864, Stuart resumed the practice of law in Springfield. He died there and was interred in the Oak Ridge Cemetery.