The Second Battle of Kernstown was fought on July 24, 1864, at Kernstown, Virginia outside Winchester, Virginia, as part of the Valley Campaigns of 1864 in the American Civil War. Confederate Lt. Gen. Jubal A. Early soundly defeated Union Brig. Gen. George Crook and drove him from the Shenandoah Valley back over the Potomac River into Maryland.
With the threat to Washington, D.C., seemingly over, Wright withdrew the VI Corps and XIX Corp from the valley to return to the aid Grant's siege of Petersburg, Virginia on July 20, leaving only the three-division strong Army of the Kanawha in the valley. The following two days were relatively quiet with both armies resting in their camps some 15 miles from each other. On July 23 Confederate cavalry attacked the Union advanced picket line Kernstown, leading to a sharp cavalry skirmish. From prisoners caught in the skirmish Early learned of Wright's departure. In order to continue to be of service to Lee in the valley, Early realized he had to attack the diminished force in front of him to ensure that Grant's force at Petersburg would not be reinforced.
The Union infantry position remained clustered around the Valley Pike in Kernstown anchored by Col. James A. Mulligan's division on Pritchard's Hill, one of the keys to the Union success at the First Battle of Kernstown in 1862. To his right, Col. Joseph Thouburn's division formed on Sandy Ridge. To his left, future president Rutherford B. Hayes's brigade formed east of the Valley turnpike. Crook dispatched cavalry under Averell to ride around the Confederate right flank and get in its rear. As the two armies skirmishers encountered one another the battle got under way. It soon became apparent to the Federal divisional commanders that they were facing a superior Confederate force which they were hesitant to attack and relayed the information to Crook.
Crook soon became impatient at the lack of his division commanders to attack the Confederate position, and distrusted their report of the Confederate strength. He ordered Mulligan to attack the Confederates with Hayes division in support. At 1 p.m. the Union infantry reluctantly moved out, abandoning Pritchard's Hill. Mulligan's division bitterly held it ground at Opequon Church where its advance was halted by Gordon's men. As Hayes's brigade advanced in support, Breckinridge marched Wharton's division to northeast to a deep ravine that ran perpendicular to the Valley Turnpike. He turned the division into the ravine, which screened his movement from the Federals on the turnpike. As Hayes came up the road past the ravine, Breckinridge ordered a charge and the Confederates assaulted Hayes's exposed flank and sent his division reeling in retreat, taking many casualties.
Thoburn was supposed to support Mulligan's right flank in the attack, but because of the topography of the battlefield, he became separated from Mulligan and saw little action during the battle. Gordon's Confederates exploited the gap in the Union line to get on Mulligan's right and when Hayes' division broke Mulligans found himself caught between two Confederate divisions. Mulligan immediately ordered a withdrawal, and was mortally wounded as he tried to rally his troops and prevent a full rout during the retreat. The Confederate infantry pressed the fleeing Federals all the way back through Winchester and the cavalry kept at their heels well into West Virginia.
Averell's cavalry had attempted to flank the Confederates as ordered but ran headlong into Vaughn's cavalry on the Front Royal Pike. The shock of the unexpected Confederate cavalry attack sent the Federal cavalry racing towards Martinsburg. When the fleeing cavalry encountered the retreating wagon and artillery trains north of Winchester it incited a panic among the Federal teamsters, causing many to abandoned their charges as they got caught up in retreat. Many of the wagons had to be burned to prevent them from falling into Confederate hands. As night fell the Confederate cavalry swept the countryside looking for Federals who had become lost from their units in retreat. Most of the Federals spent the night out in the rain, scattered across countryside, trying to evade capture.