Battle of Williamsburg The Battle of Williamsburg , also known as the Battle of Fort Magruder , took place on May 5 , 1862 , in York County , James City County , and Williamsburg , Virginia , as part of the Peninsula Campaign of the American Civil War . It was the first pitched battle of the Peninsula Campaign , in which nearly 41 , 000 Federals and 32 , 000 Confederates were engaged , fighting an inconclusive battle that ended with the Confederates continuing their withdrawal . Following up the Confederate retreat from Yorktown , the Union division of Brig . Gen . Joseph Hooker encountered the Confederate rearguard near Williamsburg . Hooker assaulted Fort Magruder , an earthen fortification alongside the Williamsburg Road , but was repulsed . Confederate counterattacks , directed by Maj . Gen . James Longstreet , threatened to overwhelm the Union left flank , until Brig . Gen . Philip Kearny ' s division arrived to stabilize the Federal position . Brig . Gen . Winfield S . Hancock ' s brigade then moved to threaten the Confederate left flank , occupying two abandoned redoubts . The Confederates counterattacked unsuccessfully . Hancock ' s localized success was not exploited . The Confederate army continued its withdrawal during the night in the direction of Richmond , Virginia . Background . When Confederate General Joseph E . Johnston unexpectedly withdrew his forces from the Warwick Line at the Battle of Yorktown the night of May 3 , Union Maj . Gen . George B . McClellan was taken by surprise and was unprepared to mount an immediate pursuit . On May 4 , he ordered cavalry commander Brig . Gen . George Stoneman to pursue Johnson ' s rearguard and sent approximately half of his Army of the Potomac along behind Stoneman , under the command of Brig . Gen . Edwin V . Sumner . He also ordered Brig . Gen . William B . Franklin ' s division to board transport ships on the York River in an attempt to move upstream and land so as to cut off Johnston ' s retreat . However , it took two days just to board the men and equipment onto the ships , so the maneuver had no effect on the battle of May 5 ; Franklin ' s division landed and fought in the Battle of Eltham ' s Landing on May 7 . By May 5 , Johnston ' s army was making slow progress on muddy roads and Stoneman ' s cavalry was skirmishing with Brig . Gen . J . E . B . Stuart ' s cavalry , Johnston ' s rearguard . To give time for the bulk of his army to get free , Johnston detached part of his force to make a stand at a large earthen fortification , Fort Magruder , straddling the Williamsburg Road ( from Yorktown ) , constructed earlier by Brig . Gen . John B . Magruder . Battle . Brig . Gen . Joseph Hooker ' s 2nd division of the III Corps was the lead infantry in the Union Army advance . It assaulted Fort Magruder and a line of rifle pits and smaller fortifications that extended in an arc south - west from the fort , but was repulsed . Confederate counterattacks , directed by Maj . Gen . James Longstreet , threatened to overwhelm Hooker ' s division , which had contested the ground alone since the early morning while waiting for the main body of the army to arrive . Hooker had expected Brig . Gen . William F . " Baldy " Smith ' s 2nd Division of the IV Corps , marching north on the Yorktown Road , to hear the sound of battle and come in on Hooker ' s right in support . However , Smith had been halted by Sumner more than a mile away from Hooker ' s position . He had been concerned that the Confederates would leave their fortifications and attack him on the Yorktown Road . Longstreet ' s men did leave their fortifications , but they attacked Hooker , not Smith or Sumner . The brigade of Brig . Gen . Cadmus M . Wilcox applied strong pressure to Hooker ' s line . Regimental bands playing " Yankee Doodle " slowed the retreating troops as they passed by , allowing them to rally long enough to be aided by the arrival of Brig . Gen . Philip Kearny ' s 3rd Division of the III Corps at about 2 : 30 p . m . Kearny ostentatiously rode his horse out in front of his picket lines to reconnoiter and urged his men forward by flashing his saber with his only arm . The Confederates were pushed off the Lee ' s Mill Road and back into the woods and the abatis of their defensive positions . There , sharp firefights occurred until late in the afternoon . While Hooker continued to confront the Confederate forces in front of Fort Magruder , Brig . Gen . Winfield S . Hancock ' s 1st Brigade of Baldy Smith ' s division , which had marched a few miles to the Federal right and crossed Cub ' s Creek at the point where it was dammed to form the Jones ' Mill pond , began bombarding Longstreet ' s left flank around noon . Maj . Gen . D . H . Hill , commanding Longstreet ' s reserve force , had previously detached a brigade under Brig . Gen . Jubal A . Early and posted them on the grounds of the College of William and Mary . Hearing the sounds of Union artillery , Early and Hill hurried in that direction . Splitting his command , Early led two of his four regiments ( the 24th and 38th Virginia Infantry ) through the woods without performing adequate reconnaissance and found that they emerged not on the enemy ' s flank , but directly in front of Hancock ' s guns , which occupied two abandoned redoubts . He personally led the 24th Virginia Infantry on a futile assault and was wounded by a bullet through the shoulder . Hancock had been ordered repeatedly by Sumner to withdraw his command back to Cub Creek , but he used the Confederate attack as an excuse to hold his ground . As the 24th Virginia charged , D . H . Hill emerged from the woods leading one of Early ' s other regiments , the 5th North Carolina . He ordered an attack before realizing the difficulty of his situation — Hancock ' s 3 , 400 infantrymen and eight artillery pieces significantly outnumbered the two attacking Confederate regiments , fewer than 1 , 200 men with no artillery support . He called off the assault after it had begun , but Hancock ordered a counterattack . The North Carolinians suffered 302 casualties , the Virginians 508 . Union losses were about 100 . After the battle , the counterattack received significant publicity as a major , gallant bayonet charge and McClellan ' s description of Hancock ' s " superb " performance gave him the nickname , " Hancock the Superb . " At about 2 : 00 p . m . , Brig . Gen . John J . Peck ' s brigade of Brig . Gen . Darius N . Couch ' s 1st Division of the IV Corps arrived to support and extend the right of Hooker ' s line , which had , by this stage , been pushed back from the cleared ground in front of Fort Magruder into the abatis and heavy wood about 600 – from the Confederate fortifications . The morale of Hooker ' s troops had been affected terribly by the loss of Captain Charles H . Webber ' s Battery " H " of the 1st U . S . Light Artillery and Captain Walter M . Bramhall ' s 6th Battery of the New York Light Artillery . Peck ' s arrival on the field and his brigade ' s recovery of Bramhall ' s battery came at a critical moment for Hooker ' s division , which was on the verge of retreat . Aftermath . The Northern press portrayed the battle as a victory for the Federal army . McClellan mis - categorized it as a " brilliant victory " over superior forces . However , the defense of Williamsburg was seen by the South as a means of delaying the Federals , which allowed the bulk of the Confederate army to continue its withdrawal toward Richmond . Confederate casualties , including the cavalry skirmishing on May 4 , were 1 , 682 . Union casualties were 2 , 283 .