In early 1861 McPherson was assigned to the staff of general Ulysses S. Grant as an engineering officer. In 1862 he impressed his superiors and was assigned to supervise military railroads in Mississippi. In this position he was a brigadier general of volunteers. After the Battle of Corinth McPherson was promoted to the rank of major general (8 October 1862). He became commander of Seventeenth Corps in the Army of the Tennessee. At the Battle of Raymond a small force of Confederates attacked his 10,000 man column. They were almost completely destroyed before they realized their mistake. He commanded his corps at the Siege of Vicksburg. 