Hooker graduated from West Point in 1837 and served in the Mexican War, rising to the rank of captain of artillery. After a leave of absence from 1851-1853, he resigned his commission to take up farming in California. When the Civil War broke out in 1861, Hooker was made brigadier general of volunteers and commanded troops defending Washington. He was assigned command of a division in the Army of the Potomac during the Peninsula Campaign in early 1862 and promoted to major general of volunteers in May.
During the Battle of Second Bull Run in late August, Hooker's division was attached to Pope's Army of Virginia. In the reorganization of the army at the beginning of the Maryland Campaign in September, Hooker was assigned command of the I Corps, Army of the Potomac, which he led in the Battle of Antietam on 17 September. Soon afterward he was promoted to brigadier general in the Regular Army. At the Battle of Fredericksburg on 13 December, Hooker served as a "grand division" commander of the Army of the Potomac, commanding the III and V Corps.
In January 1863 he was assigned command of the Army of the Potomac and led that force to defeat at the Battle of Chancellorsville, 1-4 May 1863. When Lee advanced into Pennsylvania in June, Hooker followed. In late June, after the War Department refused his request for additional troops from the garrison at Harper's Ferry, Hooker asked to be relieved of the army command-his request was immediately accepted. In September Hooker was transferred to the Western Theater, where he commanded the XI and XII Corps (later consolidated into the XX Corps).
In July 1864, when one of Hooker's subordinates was promoted over him, Hooker was relieved at his own request. For the remainder
of the war he was assigned various departmental commands. Hooker remained on active duty until 1868, when he was retired for disability contracted in the line of duty.