Williams was elected to the Sixty-third and Sixty-fourthCongresses (March 4, 1913–March 3, 1917).
He was an unsuccessful candidate for reelection in 1916 to the Sixty-fifth Congress and for election in 1918 to the Sixty-sixth Congress.
He continued the practice of law until his death in Pittsfield, Illinois, September 13, 1921.
He was interred in Pittsfield West Cemetery.