He fought at several battles in Missouri, including the Battle of Wilson's Creek, where he guarded the supply trains. President Abraham Lincoln appointed Stanley as brigadier general September 28, 1861, although the U.S. Senate did not confirm the appointment until March 7, 1862. Fighting in the Western Theater, he participated in the operations against New Madrid, Missouri and the Battle of Island Number Ten. He was involved in numerous major battles, including the Second Battle of Corinth, where he commanded a division of infantry of the Army of the Mississippi, and the Battle of Stones River, in which he led the cavalry of the Army of the Cumberland. On March 11, 1863, Stanley was appointed major general to rank from November 29, 1862. Stanley also led the Union cavalry in the Tullahoma Campaign. He fell ill late in 1863 and missed the Battle of Chickamauga. In 1864, he fought under William Tecumseh Sherman as a division commander in the IV Corps of the Army of the Cumberland during the Atlanta Campaign, and he was promoted to command of the corps when Maj. Gen. Oliver O. Howard was named commander of the Army of the Tennessee. After the capture of the city, instead of employing him marching to the sea, Sherman dispatched Stanley and his IV Corps to Tennessee to help protect the state from invasion by John Bell Hood's Army of Tennessee.