Following the war, he resumed the practice of law in Fairfield.
He served as district attorney of the sixth judicial district of Iowa in 1867 and 1871.
He served as member of the Iowa Senate from 1872 to 1879.
In 1878, McCoid was first elected as a Republican to represent Iowa's 1st congressional district in the U.S. House. He was re-elected twice, and served in the Forty-sixth, Forty-seventh, and Forty-eighth Congresses. He was an unsuccessful candidate for the Republican renomination in 1884, losing to John S. Woolson, who then lost in the general election to Democrat Benton Jay Hall. In all, McCoid served in Congress from March 4, 1879, to March 3, 1885.
After leaving Congress, McCoid again resumed the practice of law.
He died in Fairfield on May 19, 1904. He was interred in Evergreen Cemetery.