Thayer graduated from Yale College in 1869 where he studied law.
He was admitted to the bar in 1871 and commenced practice in Worcester, Massachusetts. There, he served on the city council from 1874 to 1876 and was elected an alderman from 1878 to 1880. He then ran for mayor of Worcester in 1886 without winning.
He did serve in the State Senate from 1890 to 1891.
After losing an election in 1892 to the 53rd United States Congress he was elected as a Democrat to the 56th, 57th, and 58th Congresses, serving from 4 March 1899 until 3 March 1905). Thayer did not seek reelection in 1904 but resumed his law practice in Worcester.
He died there on 19 December 1916 and was buried at the Rural Cemetery.
After unsuccessfully running for district attorney in 1876, he was elected a member of the Massachusetts House of Representatives in 1880 and 1881.