Andrew Atkinson Humphreys graduated from the United States Military Academy in 1831. After graduation, he participated in the Seminole Wars and spent much of his military career with the Corps of Topographical Engineers surveying the Mississippi Delta.
At the outbreak of the Civil War, Humphreys became an aide to General George B. McClellan. In April of 1862, Humphreys was promoted to brigadier general and served as chief topographical engineer in the Army of the Potomac throughout the Peninsula Campaign. In September of 1862, Humphreys took command of a division in the V Corps, which he led during the Battle of Antietam, as well as at the battles of Fredericksburg and Chancellorsville. He was then transferred to a division in the III Corps, under General Daniel E. Sickles, and led his division during the Battle of Gettysburg. On the second day of the battle, Humphreys did all he could to resists assaults from Confederate generals John B. Hood and Layfayette McLaws after receiving an ill-advised order from Sickles to move his troops. Following the Battle of Gettysburg, Humphreys became General Meade’s chief of staff, and served in the position until he was selected by General Ulysses S. Grant to replace General Winfield S. Hancock as commander of the II Corps. He commanded the division through the Bristoe and Mine Run campaigns, as well as during the Overland Campaign and during the Siege of Petersburg. He continued his command until the surrender at Appomattox Court House.