By the summer of 1862 the main Union Army under George McClellan was ready to march on Richmond. McClellan and his 115,000 men encountered the Confederate Army at Williamsburg on 4th May. McClellan moved his troops into the Shenandoah Valley and along with John C. Fremont, Irvin McDowell and Nathaniel Banks surrounded Thomas Stonewall Jackson and his 17,000 man army.
Thomas Stonewall Jackson was under orders from President Jefferson Davis to try and delay the attack on Richmond. Jackson attacked John C. Fremont at Cross Keys before turning on Irvin McDowell at Port Republic. Jackson then rushed his troops east to join up with Joseph E. Johnston and the Confederate forces fighting George McClellan in the suburbs the city.
On 29th May, 1862, General Joseph E. Johnston with some 41,800 men counter-attacked McClellan's slightly larger army at Fair Oaks. The first charge was made against forces led by Magruder at Seven Pines. When General George McClellan heard the firing on the other side of River Chickahominy, he sent Sumner to reinforce Magruder.In boggy, wooded terrain and heavy fighting, both sides suffered heavy losses.
General Joseph E. Johnston was badly wounded during the battle and could not take part in the next day's fighting. James Longstreet led the attack the following day but made little progress. In the afternoon, General Robert E. Lee arrived to replace Johnson. He immediately ordered a withdrawal to the original Confederate positions. During the battle the Union Army lost 5,031 men and the Confederate Army 6,134.