In June 1863, Confederate general Robert E. Lee and 75,000 soldiers of the Army of Northern Virginia invaded the North in hopes of relieving pressure on war-torn Virginia and defeating the Union Army of the Potomac guarding Washington D.C. and striking a decisive blow to Northern morale and thus ending the war with the 11 state of the Confederacy to create separate country.
According to Wikipedia:
Shortly after the Army of Northern Virginia won a major victory over the Army of the Potomac at the Battle of Chancellorsville (April 30 – May 6, 1863), Robert E. Lee decided upon a second invasion of the North (the first was the unsuccessful Maryland Campaign of September 1862, which ended in the bloody Battle of Antietam). Such a move would upset Federal plans for the summer campaigning season and possibly reduce the pressure on the besieged Confederate garrison at Vicksburg. The invasion would allow the Confederates to live off the bounty of the rich Northern farms while giving war-ravaged Virginia a much-needed rest. In addition, Lee's 75,000-man army could threaten Philadelphia, Baltimore, and Washington, and possibly strengthen the growing peace movement in the North.
By mid-June, the Army of Northern Virginia was poised to cross the Potomac River and enter Maryland. After defeating the Federal garrisons at Winchester and Martinsburg, Ewell's Second Corps began crossing the river on June 15. Hill's and Longstreet's corps followed on June 24 and June 25.
To screen his movements from the Northern Army, Lee kept the Blue Ridge Mountains and it's northern extension "South Mountain" between him and the Union Army around Washington DC. He had his Calvary under Jeb Stewart guard the passes to keep the Union from knowing his movements. His army crossed the Potomac River near Hagerstown Maryland.Jon Anderson of the Army Times gives us a report:
Harrisburg residents are packing into trains and wagons, loaded down with luggage and whatever cherished items they can carry. Government officials in the capital are also preparing to evacuate.
Governor Andrew Curtin has ordered local militia units to defend Pennsylvania's border from “the Rebel Invader.”
Gen. Robert E. Lee’s of Army of Northern Virginia will have to get through Maryland first.
Fresh from their victory in Winchester, Va., Lee’s lead units — including a brigade of cavalry — began crossing the Potomac near Hagerstown yesterday afternoon, now followed by major units from at least one of his three corps.