Thayer was born on a farm near Lima, New York on July 15, 1827. He recieved a public education before studying law in college. He was admitted to the New York State Bar in 1851. He then practiced law with his brother in Buffalo and later Tonawanda.