The Seven Days Battles
By late May, McClellan had managed to march his host of Federal soldiers up the peninsula between the York and James rivers to the gates of Richmond. He sent a portion of his army north of the Chickahominy River, the better to link up with portions of McDowell's army. The Chickahominy River parallels the James for a way before flowing into it and was a difficult barrier for infantry and cannon to cross when flooded.
Confederate general Joe Johnston saw an opportunity to raise the Union siege on Richmond. On May 31, he took many of his troops out of their defenses and trenches guarding Richmond and struck that part of the Federal host south of the river. However, subordinates misunderstood their orders or did things their own way, and the ensuing fight, called Fair Oaks or Seven Pines, was basically a draw. Very significantly, however, Johnston was seriously wounded in the fight. President Davis replaced him with his military advisor, Robert E. Lee, who began calling his command the Army of Northern Virginia.
Lee's New Plan
After the Battle of Seven Pines, the Southerners withdrew again into their Richmond defenses, but both Davis and Lee could see that the Union stranglehold would eventually capture Richmond. Like Johnston before him, Lee decided to take a huge risk by taking his men out of their defenses and attempting to defeat the Federal troops in open battle.
When Lee withdrew men from Richmond defenses south of the Chickahominy River, only 25,000 Southerners remained to face about 75,000 Federal troops south of the river. McClellan, however, did not understand his overwhelming superiority of numbers in this area.
Lee conferred with Stonewall Jackson, then finishing his astonishing work in the Shenandoah Valley. The plan was to have Jackson slip away from the Union armies there, march to Richmond's north side, join with Lee's men coming out of their defenses, and fall upon the northern flank of McClellan's army. Done precisely, the attack would crumple McClellan's army from one wing to the other.
A Week of Fighting
It did not go exactly according to plan. Two of Lee's subordinate commanders, Generals James Longstreet and D. H. Hill, withdrew their troops from their entrenchments and marched them in stealth north of the Chickahominy. Jackson, however, was late. His tardiness was uncharacteristic and is sometimes blamed on exhaustion owing to his fevered Valley Campaign, but Longstreet and Hill went into battle without him on June 26. This became known as the Battle of Mechanicsville, the first of the so-called Seven Days Battles, a week of fighting that wrecked McClellan's hopes for capturing Richmond.
On this and the next day, McClellan might easily have battled his way into Richmond south of the Chickahominy River, but he severely overestimated the number of Confederates he faced. Instead, he pulled his right wing down toward the remainder of his army. The next day, Jackson still wasn't in position, but Lee kept pounding, a battle that became known as Gaines' Mill. The following day, McClellan continued his retreat south toward Harrison's Landing on the James River, where Union gunboats could use their considerable artillery if need be to fire over the Union army in its defense.
When Robert E. Lee took over the Confederate army protecting Richmond, why did he name it the Army of Northern Virginia?
Lee understood that most of the troops had come down from northern Virginia and felt he should lead the army back there to fight the Federals further north and away from Richmond, which was in southern Virginia.
Lee continued the offensive on June 29 in a battle called Savage Station and again on June 30, a battle called Fraser's Farm. Throughout the Seven Days, Confederate forces were smaller than Union ones, but McClellan always thought the opposite. He retreated to a prominence called Malvern Hill near Harrison's Landing. On July 1, Lee, believing one last blow would crush the Union host, sent his soldiers up Malvern Hill. But here Union artillery cut them down in large numbers. Lee had to stop, and the Federals were safe alongside their powerful gunboats.
Richmond was liberated and McClellan's army was clearly beaten and demoralized. The Southerners had taken a terrible risk, but they had won and gained what turned out to be almost three more years of life for the Confederacy.

