He was elected in 1830 as a Jacksonian (later a Democrat) to the U.S. Senate to fill the vacancy caused by the death of John McLean. He was reelected in 1835 and served from December 11, 1830, until his retirement on March 3, 1841, and was not a candidate for reelection. While in the Senate, he was chairman of the Committee on Engrossed Bills (Twenty-second Congress) and a member of the Committees on Militia (Twenty-second through Twenty-fourth Congresses) and Post Office and Post Roads (Twenty-fourth through Twenty-sixth Congresses).
In 1830, he was elected to the U.S. Senate to fill the vacancy left by John McLean's death. He served from December 11, 1830, until March 3, 1841, and did not seek re-election. During his time in the Senate, he chaired the Committee on Engrossed Bills and was a member of the Committees on Militia and Post Office and Post Roads.