After the state of Mississippi seceded just before the start of the Civil War, Barksdale resigned from Congress to become adjutant general, and then quartermaster general, of the Mississippi Militia, at the rank of brigadier general, with date of rank March 1, 1861. On May 1, he was appointed colonelin the Confederate States Army of the 13th Mississippi Infantry, a regiment that he led in the First Battle of Bull Run that summer, and the Battle of Ball's Bluff in October. The following spring, he took his regiment to the Virginia Peninsula and fought in the Peninsula Campaign and the Seven Days Battles. When his brigade commander, Brig. Gen. Richard Griffith, was mortally wounded at the Battle of Savage's Station on June 29, 1862, Barksdale assumed command of the brigade and led it in an heroic, but bloody and futile, charge at the Battle of Malvern Hill. The brigade became known as "Barksdale's Mississippi Brigade." He was promoted to brigadier general on August 12, 1862.
In the Northern Virginia Campaign, Barksdale's Brigade was stationed at Harpers Ferry, and thus did not participate in the Second Battle of Bull Run. In the Maryland Campaign, his brigade was assigned to the division of Maj. Gen. Lafayette McLaws in Lt. Gen. James Longstreet's First Corps of theArmy of Northern Virginia. It was one of the brigades that attacked Maryland Heights, leading to the surrender of the Union garrison at Harpers Ferry. At the subsequent Battle of Antietam, McLaws's Division defended the West Woods against the assault by Maj. Gen. John Sedgwick's division, saving the Confederate left flank. At the Battle of Fredericksburg, Barksdale's Brigade defended the waterfront of the city from Union forces attempting to cross the Rappahannock River, sniping at infantry and engineer forces from buildings that had been turned into rubble by Union artillery.General Barksdale's gravestone in Greenwood Cemetery, Jackson, Mississippi.
At the Battle of Chancellorsville in May 1863, Barksdale's Brigade was one of the few units in James Longstreet's Corps that was present at the battle; most of the corps was detached for duty in Suffolk, Virginia. Once again, Barksdale's brigade defended the heights above Fredericksburg, this time against his previous adversary, Sedgwick, whose VI Corps was over ten times the size of his brigade. Sedgwick's assault was successful and Barksdale pulled back after delaying the Union force, but he was able to rally his brigade and retake the lost ground the next day.
At the Battle of Gettysburg, Barksdale's Brigade arrived with McLaws's Division after the first day of battle, July 1, 1863. The plan from General Robert E. Lee was for Longstreet's Corps to maneuver into position and attack northeast, up the Emmitsburg Road, to roll up the Union left flank. Barksdale's sector of the attack placed him directly at the tip of the salient in the Union line anchored at the Peach Orchard, defended by the Union III Corps. At about 5:30 p.m., Barksdale's Brigade burst from the woods and started an irresistible assault, which has been described as one of the most breathtaking spectacles of the Civil War. A Union colonel was quoted as saying, "It was the grandest charge that was ever made by mortal man."Although he ordered his subordinate commanders to walk during the charge, Barksdale himself rode on horseback "in front, leading the way, hat off, his wispy hair shining so that it reminded [a Confederate staff officer] of 'the white plume of Navarre'."
The Confederates smashed the brigade manning the Peach Orchard line, wounding and capturing the Union brigade commander himself. Some of Barksdale's regiments turned to the north and shattered Maj. Gen. Andrew A. Humphreys's division. Others of his regiments went straight ahead. By the time his men had gone as far as Plum Run, a mile into the assault, they were counterattacked by a brigade under Colonel George L. Willard. Barksdale was wounded in his left knee, followed by a cannonball to his left foot, and finally was hit by another bullet to his chest, knocking him off his horse. He told his aide, W.R. Boyd, "I am killed! Tell my wife and children that I died fighting at my post." His troops were forced to leave him for dead on the field and he died the next morning in a Union field hospital (the Joseph Hummelbaugh farmhouse).