 He was elected as a Democrat to the Twenty-sixth Congress, serving from March 4, 1839 until March 3, 1841.He was an unsuccessful candidate for reelection in 1840 to the Twenty-seventh Congress.While in Congress, Smith delivered the speech, ""The Defense of the Independent Treasury Idea", which gained national attention and was considered one of the best speeches on this subject.