Barringer was promoted to brigadier general on 1 June 1864 and was assigned to command a cavalry brigade consisting of the First, Second, Third, and Fifth North Carolina. He led his brigade in the almost constant cavalry fighting and skirmishing that marked the 1864 campaign in Virginia. In August, while temporarily in command of Fitz Lee's division, he participated in the rout of Union forces at Ream's Station, for which he received the compliments of Robert E. Lee. On 3 April 1865, after the disastrous battle of Five Forks had forced the retreat of the Confederate army from Richmond and Petersburg, Barringer's command was ordered to hold Namozine Church, an important point about thirty miles west of Petersburg. In the ensuing engagement, Barringer was captured by scouts of Union general Philip H. Sheridan, who were disguised as Confederate soldiers. He was sent to City Point, Virginia, where he was presented to President Abraham Lincoln, who recalled Barringer's older brother Moreau, with whom Lincoln had desked in Congress. Before parting, Lincoln gave Barringer a note, addressed to Secretary of War Edwin Stanton, asking that the North Carolinian receive special consideration. Barringer was confined to the Old Capitol Prison, but thanks to Lincoln's note to Stanton, he was soon transferred to Fort Delaware. He was held there until 23 July, when he was released on parole. Throughout the war, Barringer participated in seventy-six actions, had two horses shot from under him, and was wounded three times.