In 1866, three years after moving to to Lewiston, Thayer was elected District Attorney for the Third Judicial District of Idaho Territory. From 1866 until 1867, he moved to Boise to serve for a session of the Idaho Territory House of Representatives. He moved to Portland, Oregon shortly after leaving the legislature.