In mid-1864, Lee attempted to relieve Union pressure against his army by restaging a threat to Washington, D.C. Jubal Early was dispatched to the Shenandoah Valley where he enjoyed early success, advancing across the Potomac River into Maryland. He defeated a small Union army under General Lew Wallace [later the author of Ben Hur] by the Monocacy River south of Frederick, Maryland. Several days later, Early was within sight of Washington; he succeeded in frightening a number of politicians, but did not deter the plans of the president or Grant. Lincoln actually observed nearby action and became the only sitting president to come under enemy fire.
Grant sent Union forces under Philip Sheridan to deal with the threat to Washington. Early withdrew into Virginia, but later returned across the Potomac. He conducted wide-ranging raids, venturing as far north as Chambersburg, Pennsylvania, which was burned in retaliation for destruction inflicted in the South. In September and October 1864, Sheridan defeated Early in battles at Winchester, Fisher’s Hill, and Cedar Creek—a series of engagements that secured the Northern capital and boosted Lincoln's reelection chances.
Sheridan’s soldiers laid waste to the Shenandoah Valley, the breadbasket of Confederate forces in Virginia. Everything of conceivable import to the war effort was burned or killed—homes, barns, crops and livestock.
A greatly reduced force under Early was defeated by George A. Custer at Waynesboro, Pennsylvania, in early March 1865, which opened a clear path to Richmond for Union forces.