Williams was elected as a Whig to the Twenty-fifth, Twenty-sixth, and Twenty-seventh Congresses by Tennessee's thirteenth district.
After the number of districts held by Tennessee had been reduced, Williams was elected by Tennessee's eleventh district to the Thirty-first and Thirty-second Congresses.