williams was re-elected to successive congresses before his death in 1842. in keeping with the turbulent times in which the parties realigned, he served under five different party labels: as a republican, as a crawford republican, as a supporter of john quincy adams, as an "anti-jacksonian," and finally as a whig. during his time in congress, he chaired the committee on claims in the 15th through 21st congresses, and the committee on territories during the 23rd congress. williams also introduced the resolution creating the united states house committee on agriculture. he died in washington, dc, while in office in 1842 and is buried in panther creek cemetery near lewisville, north carolina.