Hoke entered the Confederate service as a 2nd Lieutenant in the 1st North Carolina Infantry. He participated in the Battle of Big Bethel. He was subsequently promoted to major, and then lieutenant colonel of the 33rd North Carolina Infantry. He quickly received yet another promotion to colonel of 21st North Carolina Infantry. He served all across Virginia, from the Seven Days' campaign to the Chancellorsville campaign. He was wounded in the Battle of Fredericksburg, after which point, he was promoted to brigadier general. During his recovery in North Carolina, he captured Plymouth, which led to his promotion to major general in April 1864. He returned to Virginia during the Petersburg campaign, at the Battle of Drewry's Bluff, and at the Battle of Cold Harbor. On orders to return to North Carolina, his command marched to Fort Fisher. He served the rest of the war in the army of Gen. Joseph E. Johnston. He participated in the Battle of Bentonville, NC, before the final surrender.