Born in Greencastle, Indiana, Hunter moved with his parents to Paris, Illinois, in 1832. He attended the common schools and Edgar Academy. He worked as a civil engineer from 1852 to 1856.
He studied law, was admitted to the bar in 1856, and commenced practice in Paris. He served as member of the Illinois Senate 1864–1868, and was also a member of the board of investigation of State institutions. He was an unsuccessful candidate in 1870 to the Forty-second Congress and again, in 1882, to the Forty-eighth Congress.