He was admitted to the bar the same year and commenced practice in Rochester, New York.
Williams was a probate court judge from 1857 to 1865 and a member of the Michigan Senate from 1866 to 1870, serving as president pro tempore in 1869.
In 1871, he was appointed by Governor Henry P. Baldwin to serve as a member of the State board for the supervisory control of the charitable, penal, and beneficiary institutions, which position he resigned upon his election to the U.S. Congress.
After the death of U.S. Representative Wilder D. Foster on September 20, 1873, Williams was elected November 4, 1873 as a Republican to fill the vacancy.
Williams was elected to represent Michigan's 5th congressional district in the 43rd Congress, serving from December 1, 1873 to March 3, 1877.