Following his decisive defeat and rout of Pope in the Second Battle of Bull Run (August 29-30, 1862) and the standoff fight with the Union rearguard in a driving rainstorm at Chantilly, Lee led his victorious army across the Potomac into Maryland. Here on September 9 he split his army into two wings, sending Jackson to capture the Union garrison at Harpers Ferry and Longstreet to advance toward Hagerstown. Four days later, a copy of his orders fell into the hands of McClellan, in command again of the Union army. Now, if he moved swiftly, McClellan could destroy the two wings separately before they could reunite. It was a priceless opportunity to practically end the war.
But "Little Mac" moved cautiously. He was delayed in forcing the South Mountain passes. By the time his great army--almost twice the number of Lee's army of 40,k000--reached Antietam Creek and the little village of Sharpsburg, Lee had drawn his divided army together (lacking one division still at Harpers Ferry) and drawn it up in line of battle with its back to the Potomac.
Dawn of September 17 opened "the bloodiest single day of the war". Beginning on his right, McClellan launched a series of piecemeal, uncoordinated attacks, savagely contested, that wrote in blood on the pages of American history the names of the East Wood, the West Wood, the Cornfield, the Dunker Church, the Roulette farm, the Piper house, and Bloody lane. Fought to a standstill on the right and center, the federals finally forced a crossing of the Antietam on their left at Burnside's Bridge and stormed up the slope beyond, driving the exhausted Confederates and threatening Lee's whole army. At that crucial moment, A. P. Hill's Light Division arrived on the field from Harpers Ferry, charged, and sent the surprised Federals reeling back. Night brought an end to the slaughter.
Amazingly, with a terribly crippled army, Lee planned an attack next day, was dissuaded by his subordinates of its impossibility, and retired unmolested across the Potomac that night, leaving a battlefield literally carpeted with the dead of both armies. The war that an aggressive McClellan might have ended that day would now drag on for nearly three years.