In April 1861, after Virginia announced its secession from the Union, Barron resigned from the U.S. Navy and, although his resignation was denied by the United States (later being listed by Navy Secretary Gideon Welles on April 22 as dismissed), he accepted a commission as Captain in the Virginia Navy and, as chief of the Office of Naval Detail and Equipment, later assisting in organizing a coastal defense of the Virginia and North Carolina coastlines.
After Virginia's fleet was integrated with the Confederate Navy, Barron was issued a commission as commander and appointed chief of the Office of Orders and Details on June 10.
Barron would remain in that post until July 20, when Confederate Secretary of the Navy Stephen R. Mallory agreed to Barron's request to be assigned as commander of coastal defences of Virginia and North Carolina, an important port for Pamlico Sound-based Confederate privateers.
After the ships were seized by British authorities the following year, Barron traveled to France, remaining in Paris as "Flag Officer" commanding Confederate States Naval Forces in Europe acting as a contact for Confederate naval officers as well as blockade runners and privateers until February 25, 1865 when he resigned his commission, returning to the United States shortly before the Confederacy's surrender a month later.
Retiring to his home in Essex County, Virginia, Barron took up farm life until his death on February 26, 1888.