In 1861, Sheridan was promoted from frontier duty to the chief quartermaster and commissary of the Army of Southwest Missouri. During the advance on Corinth, he served as an aide on the staff of General Henry W. Halleck. In May 1862, Sheridan was appointed as colonel of the 2nd Michigan cavalry. By September, he advanced to rank of brigadier general. Sheridan participated in the battles of Perryville before he was promoted to major general on the date of the Battle of Murfreesboro. After Sheridan led a division into battle at Chickamauga, he distinguished himself in the subsequent action at Chattanooga. When General Ulysses S. Grant became the commander of all Union armies, he gave Sheridan the command of all the cavalry. In the summer of 1864, Sheridan fought at the battles of Yellow Tavern, Haw's Shop, and Trevilian Station. After the Confederate raid toward Washington, Sheridan was sent to raid the Shenandoah Valley. He defeated Gen. Jubal Early at the battles of Winchester and at Fisher's Hill before his Army of Shenandoah was surprised into retreat. After he reformed his army, he was promoted to major general. Sheridan rejoined the Army of the Potomac at the surrender of the Army of Northern Virginia at Appomattox Court House.