Hooker was born in Hadley, Massachusetts, the grandson of a captain in the American Revolutionary War.
After the Mexican-American War (ending in 1848), he served as assistant adjutant general of the Pacific Division, but resigned his commission in 1853; his military reputation had been damaged when he testified against his former commander, General Scott, in the court-martial for insubordination of Gideon Johnson Pillow.