After Second Manassas, Lee attempted a pursuit of Pope\'s retreating forces, but Pope managegd to withdraw to the defenses of Washington, D.C., with minimal further damage to his forces. Lee was confronted with the question of what to do next. Remaining in Northern Virginia was impractical, as was attacking the Federal Army safely within the perimeter of the Washington forts. Lee could return south towards Richmond, head west to the Shennendoah Valley, or take a radical step and go northward into Maryland, invading territory which was in theory still loyal to the Union cause. He elected to head north, launching the Maryland Campaign of 1862.
Lee\'s forces crossed the Potomac at fords near Leesburg, Virginia, on September 3rd. and headed towards Fredrick, Maryland. While in camp south of Frederick, Lee became aware that the Federals had not evacuated the exposed garrison at Harper\'s Ferry, Virginia. This evacuation had been expected as Harper\'s Ferry is fairly indefensible, and the failure to evacuate presented Lee with problems as it threatened his planned supply line for his operations in Maryland and Pennsylvania. Lee devised a risky plan to split up his army. He woudl send 3 divisions to Harper\'s Ferry to surround and capture it, under the overall command of Stonewall Jackson. Longstreet\'s forces would head to Hagerstown, Maryland, leaving D.H. Hill\'s division behind to protect Turner\'s gap at South Mountain. A small force would be posted further south on South Mountain to protect Crampton\'s Gap. Lee wrote Special Order 191, outlining this plan.
In Washington, Pope had been relieved of command and the forces of McClellan\'s and Pope\'s armies had been consolidated into a single army under McClellan\'s command. The cabinet was not entirely happy about this, but agreed to the restoration of McClellan because there really wasn\'t a better alternative. McClellan started the army moving west in the pursuit of Lee\'s forces on September 7th. The front was fairly broad, as McClellan needed to cover the routes to both Washington and Baltimore, as noone was really sure what Lee\'s goal was. McClellan averaged about 6 miles a day. He is often severely critqued for this, but it does not seem to be such a bad pace under the circumstances.
A copy of Special Order 191, was lost under circumstances which are not clearly understood. It was recovered by McClellan\'s forces late when they reached Fredrick, and was in McClellan\'s hands the morning of the 13th. The order revealed that Lee had divided his army, and where the units had dispersed to, but did not indicate the force makeup, only who the commanders of the various units were. While a sigificiant element of the campaign, the real impact of Special Order 191 on Federal operations is usually overstated. McClellan would likely have done approximately the same things if he had not seen the order, and might have moved more quickly.
Stonewall Jackson\'s force took 3 days to reduce the garrison at Harper\'s Ferry (September 12th-15th.) This was longer than anticipated, and delayed Jackson\'s reunion with the main body of Lee\'s forces.
On September 14th, McClellan\'s forces reached the gaps at South Mountain. They succeeded in forcing Crampton\'s Gap (to the south) that day, but the fighting further north at Turner\'s and Fox\'s gap was suspended due to darkness. The Union forces would probably have broken through when fighting resumed, but Lee chose to withdraw his forces that night.
Lee chose to defend a position on a ridgeline on the west side of Antietam Creek. The town of Sharpsburg is located behind this line. The Battle of Antietam would be fought on September 17th, 1862. It would be a tactical draw, and Lee withdrew the night of September 18th in the direction of Shepardstown, where he planned to cross the river. McClellan would pursue briefly, but not in an agressive and sustained manner, and Lee would make a clean escape.