Born in Lima, New York, Thayer attended public schools in New York and began a legal practice in Lima with his brother. In March 1853, he set out for Oregon, via ox team on the Oregon Trail. He arrived in Salem in August 1853, and settled on a farm near Corvallis where he farmed and continued his legal practice. In 1859, he was appointed by President James Buchanan to be U.S. Attorney for the District of Oregon, a position he held for six months, after which he resigned, stating that he preferred to defend rather than prosecute.
In November 1860, Thayer was elected as a Democratic United States Representative for Oregon's at-large district. Unfortunately for Thayer, this was not the only election held for Oregon's congressional seat in 1860. In June of that year, Oregon had held its general election, and George K. Shiel was elected to the same seat that Thayer claimed in November. After the June election, the Oregon House of Representatives had passed a bill moving the date of U. S. Congress elections to November, effective immediately. The Oregon Senate passed a similar bill, but that bill did not apply to the current election. Though the bills were never reconciled or signed into law, an election was held nonetheless. Thayer's election was certified and he took the seat in March 1861.
Shiel promptly contested the election, stating that the Oregon constitution had been circumvented and that no law had been passed to change the election date. Thayer's argument was that the election specified by Oregon's constitution only applied to Oregon's first congressional election in 1858, and therefore the June 1860 election was invalid. In the absence of a law providing for Congressional elections, Oregon had a right to Congressional representation. Thayer pointed to the clear intent of the Oregon Legislature to have a November election, which did occur, and which elected him.
On July 30, 1861, the House of Representatives Committee on Elections, led by Henry L. Dawes of Massachusetts, sided with Shiel, holding that the state constitution's June election date was intended to be applied to all elections. Even if the Oregon Legislature had passed a change to the election date, it would have been unconstitutional; moreover, since the Oregon Legislature did not actually enact the law, Shiel's election should be upheld and Thayer unseated.
Representative Thaddeus Stevens of Pennsylvania agreed with Thayer's argument that this decision was in violation of Article I, Section 4 of the United States Constitution, which gives the power to the state legislatures to set election dates. He offered an amendment that the seat be declared vacant, but it was defeated 77-37. The House stripped Thayer of his seat and issued the oath of office to Shiel immediately.
Thayer returned to his Oregon law practice, where he was joined by his brother (and future Oregon governor) William W. Thayer.
He served as district attorney for the second district of Oregon from 1862 to 1864. In 1870 Thayer was elected to the Oregon Supreme Court to replace John Kelsay. In this position he also rode circuit for Oregon's second judicial district. However, he did not finish the six-year term as he died in office. He died in Corvallis on April 28, 1873 and is buried at Corvallis's Crystal Lake Masonic Cemetery.