In the Northern Virginia Campaign, Barksdale's Brigade was stationed at Harpers Ferry, and thus did not participate in the Second Battle of Bull Run. In the Maryland Campaign, his brigade was assigned to the division of Maj. Gen. Lafayette McLaws in Lt. Gen. James Longstreet's First Corps of the Army of Northern Virginia. It was one of the brigades that attacked Maryland Heights, leading to the surrender of the Union garrison at Harpers Ferry. At the subsequent Battle of Antietam, McLaws's Division defended the West Woods against the assault by Maj. Gen. John Sedgwick's division, saving the Confederate left flank. At the Battle of Fredericksburg, Barksdale's Brigade defended the waterfront of the city from Union forces attempting to cross the Rappahannock River, sniping at infantry and engineer forces from buildings that had been turned into rubble by Union artillery.