James Conner participated in the bombardment of Fort Sumter as a captain of the Montgomery Guards, a South Carolina militia unit. At the beginning of the Civil War, he declined an appointment as a district attorney for the Confederacy. Instead, he became a captain in the Hampton Legion and fought at the Battle of First Bull Run (First Manassas), taking temporary command of the legion after Colonel Wade Hampton was wounded. On July 21, 1861, Conner was appointed major of Hampton's Legion. After the Battle of Seven Pines during the Peninsula Campaign, he took command of the 22nd North Carolina Volunteer Infantry Regiment. During the Seven Days Battles, his leg was broken by a rifle ball during the Battle of Gaines Mill. After a two-month recovery period, he returned to lead his regiment at the Battle of Chancellorsville and the Battle of Gettysburg.