This was the decisive series of battles in the Peninsula Campaign. The Union had become fixated on taking Richmond believing that taking out the Confederate capital would lead to the collapse of the Confederacy. It has to be said that the Confederates felt if they could capture Washington they could win the war.
McClellan had started this campaign in March again with the ultimate goal of taking Richmond. He was incredible cautious and made constant demands on Washington for additional men and material. Slowly but surely McClellan advanced on Richmond. Here's a quick summary of the battles:
Battle Summary:McCllelan's forces advanced to within 15 miles of Richmond. On June 26th, Lee's forces attacked Union forces at Mechanicsville. The Union forces were victorious, but McClellan ordered a withdrawal to Gaines' Mill. There, Confederate forces broke Union lines the next day. McClellan then ordered a general withdrawal. Three more battles were fought, including one at Malvern Hill, in which Confederate troops were slaughtered, in an ill advised attempt to scale it. In the end however, McClellan withdrew all of his troops to Harrison Landing.
Union forces stayed at Harrison Landing for the next six weeks or so and then slowly began to go withdraw to Washington the same way they had come there by sea.