In 1861, at the age of 19, Roberts enlisted as a private in Company C of the 19th Regiment North Carolina Infantry, which would later be designated as the 2nd Regiment NC Cavalry. Having served with distinction during regimental operations in North Carolina, but with no formal military training, he was promoted to second lieutenant on August 30, 1861. On September 13, 1862, Roberts was promoted to First Lieutenant. Roberts' regiment was transferred to Virginia in the fall of the same year and took part in several battles, among them: Battle of Fredericksburg, Battle of Suffolk, and Battle of Brandy Station. On November 13, 1863, Roberts was promoted to captain and then major before the spring of 1864, when he fought in the North Carolina brigade of William Henry Fitzhugh Lee's division. He was promoted to colonel in June 1864 and during the Siege of Petersburg, he was given command of the 2nd Regiment NC Cavalry. Roberts led a charge against Union breastworks, dismounted, overtook the rifle pits and captured several Union soldiers at the Second Battle of Ream's Station on August 25, 1864. On February 23, 1865, Roberts was promoted to brigadier general. According to tradition, General Robert E. Lee presented Roberts with Lee's personal gauntlets in recognition of Roberts' distinguished service. Roberts continued the command of his brigade at the Battle of Five Forks, and eventually surrendered at the Battle of Appomattox Court House, on April 9, 1865.