Hatch was born in Oswego, N. Y., a son of Moses Porter and Hannah (Reed) Hatch. He graduated from the United States Military Academy in 1845, ranking 17th in his class. He experienced his first active field service as a second lieutenant in the 3rd U.S. Infantry during the Mexican War. In May 1846, he served under General Zachary Taylor at Palo Alto and Resaca de la Palma. He was transferred later to serve under Winfield Scott in the Mounted Rifles. He was brevetted as a first lieutenant for gallant service in the subsequent battles of Contreras and Churubusco, and captain for bravery at Chapultepec.