The only time D.C. came under attack during the the Civil War was at this fort, near the Fort Totten metro station:
On July 11, 1864, Lt. Gen. Jubal A. Early's exhausted Confederates reached the outskirts of Washington near Silver Spring. Skirmishers advanced to feel the fortifications, which at the time were manned only by Home Guards, clerks, and convalescent troops.
During the night, veteran units from the Union VI Corps disembarked from troop transports and marched north through the streets of Washington to bolster the defenses.
On July 12, Early was finally in position to make a strong demonstration, which was repulsed by the veteran Union troops. In the afternoon, VI Corps units sortied against the Confederate skirmishers, driving them back from their advanced positions in front of Forts Stevens and DeRussy.
Also rather interesting: President Lincoln watched the action from Fort Stevens and came under fire from Confederate sharpshooters.
Another view of its location today:
