With the outbreak of the Civil War, he resigned his commission and joined the 3rd Arkansas Infantry as a lieutenant colonel in the Confederate army. Serving under Gen. Robert E. Lee, Barton saw action at the battles of Cheat Mountain and Greenbrier River, and later with Gen. Thomas "Stonewall" Jackson as chief engineer during the Valley Campaign in 1862.