Hunter was born in Spencer, Massachusetts on 26 August 1843. He joined the Army in June 1862, and first saw action at the Battle of Charlestown. He was promoted to corporal in November 1863, and would serve as a color guard or color bearer for his company in every battle in which they served. Hunter subsequently saw extensive action in the Shenandoah Valley, fighting at the Battles of Newmarket, Piedmont, Lynchburg, Snicker's Ford, Second Kernstown and Martinsburg, Halltown, Berryville, Third Winchester, Fisher's Hill, Stickney's Farm, and Cedar Creek.