Excerpts from Books and Wikipedia
"In the summer of 1862, the Confederacy launched an offensive from Virginia under the command of General Robert E Lee, who moved north to cross the Potomac River into Maryland. He intended to invade Pennsylvania, but his advance ended with the bloodiest battle of the entire war." [1001 Days] "Despite having superiority of numbers, McClellan's attacks failed to achieve force concentration, which allowed Lee to counter by shifting forces and moving interior lines to meet each challenge. Therefore, despite ample reserve forces that could have been deployed to exploit localized successes, McClellan failed to destroy Lee's army. McClellan had halted Lee's invasion of Maryland, but Lee was able to withdraw his army back to Virginia without interference from the cautious McClellan. McClellan's refusal to pursue Lee's army led to his removal from command by President Abraham Lincoln in November. Although the battle was tactically inconclusive, the Confederate troops had withdrawn first from the battlefield, making it, in military terms, a Union victory. It was a sufficiently significant victory to give Lincoln the confidence to announce his Emancipation Proclamation . . ."