Hooker was born in Hadley, Massachusetts, the grandson of a captain in the American Revolutionary War. He was of entirely English ancestry, all of whom had been in New England since the early 1600s. His initial schooling was at the local Hopkins Academy. He graduated from the United States Military Academy in 1837, ranked 29th out of a class of 50, and was commissioned a second lieutenant in the 1st U.S. Artillery. His initial assignment was in Florida fighting in the second of the Seminole Wars. He served in the Mexican–American War in staff positions in the campaigns of both Zachary Taylor and Winfield Scott. He received brevet promotions for his staff leadership and gallantry in three battles: Monterrey (to captain), National Bridge (major), and Chapultepec (lieutenant colonel). His future Army reputation as a ladies' man began in Mexico, where local girls referred to him as the "Handsome Captain".