When the Civil War began, Lewis joined the Confederate army as the third lieutenant of Company A, 1st North Carolina Regiment ("Bethel"). His first fighting came in the
Battle of Big Bethel on June 10, 1861. By January 1862, he had been promoted to
major and took part in the
Battle of New Bern. For his actions at New Bern, he was promoted to
lieutenant colonel of the 33rd North Carolina Infantry. Lewis fought with the regiment at the
Seven Days Battle and the
Battle of Malvern Hill. During the later months of 1862, he took part in the defense of
Richmond. Lewis returned to North Carolina in December 1862 and took part in the fighting in and around New Bern and
Kinston. In the spring of 1863, his regiment returned to Virginia and he took part in the
Gettysburg campaign with the 43rd North Carolina Infantry as part of Brigadier General
Junius Daniel's Brigade of
Major General Robert Rodes' Division. At
Gettysburg, the regimental commander,
Colonel Thomas S. Kenan, was wounded and captured, and Lewis took command of the regiment. After the Confederate retreat from Gettysburg, Lewis returned to North Carolina and took positions around New Bern. He subsequently took part in the fighting to recapture Plymouth. He led
Robert Hoke's brigade at the
Battle of Cold Harbor and was promoted to brigadier general following the battle in June 1864. He was then wounded during
Jubal Early's raid on
Washington. In 1864, he married Martha Lucinda "Mittie" Pender, first cousin of Major General
Dorsey Pender. Lewis also supervised the entrenchment of
Drewry's Bluff, Virginia. He took part in a skirmish near
Farmville, Virginia, on April 7, 1865, but was once again wounded and captured during the fighting. He was paroled within two weeks. Throughout his military service in the Confederate Army, Lewis saw action in 37 battles and skirmishes. ==Postwar career==