After defeating Confederates at the Battle of Piedmont (June 5, 1864), Union Gen. David Hunter moved southward, blazing a path of destruction that climaxed with the burning of the Virginia Military Institute in Lexington.
From Lexington, Hunter advanced against the Confederate rail and canal depots and the hospital complex at Lynchburg. Reaching the outskirts of town on June 17, his first tentative attacks were thwarted by the timely arrival by rail of Confederate Gen. Jubal A. Early’s II Corps vanguard from Charlottesville. Hunter withdrew the next day after sporadic fighting because of a critical shortage of supplies. His line of retreat through West Virginia took his army out of the war for nearly a month and opened the Shenandoah Valley for a Confederate advance into Maryland.
Early would move towards Washington, D.C. itself in a bid to change the course of the war, as Union commanders raced against time to bolster their undermanned defenses. The two sides would meet at the Monocacy River on July 9.