Porter led his division at the beginning of the Peninsula Campaign, seeing action at the Siege of Yorktown. McClellan created two provisional corps and Porter was assigned to command the V Corps. During the Seven Days Battles, and particularly at the Battle of Gaines' Mill, he displayed a talent for defensive fighting. At the Battle of Malvern Hill, Porter also played a leading role. For his successful performance on the peninsula, he was promoted to major general of volunteers on July 4, 1862.