Following his training, Anderson was sent to California to assist in the survey of a proposed railroad route before joining his regiment at Fort Chadbourne in Texas. On December 13, 1855, he was promoted to first lieutenant.[3] He commanded his cavalry troop in the march from Texas across the plains to Fort Riley, Kansas. In 1858, he was the adjutant of the regiment while serving in the Utah Territory during the Utah War and promoted to Captain.[4] In 1859, he was ordered to Louisville, Kentucky, for duty as a recruiting officer. There, he met and married Mildred Ewing. He also served another stint as Adjutant from August 1858 to September 1859.[3]
Historian Douglas Southall Freeman wrote of Anderson, "All the physical excellencies coveted by soldiers were abundantly his - a handsome figure, fine horsemanship, a clear musical voice, a commanding presence. His discipline had seemed as mild as his blue-gray eyes, but it had been firm. In battle, as he rode calmly alert, with his golden beard flowing, he had inspired his fine regiments."[6]
Peninsula Campaign and Malvern Hill
Anderson capably led his regiment at the Battle of Williamsburg in May 1862 and was rewarded a month later with a promotion to brigadier general on June 9.[3] He was assigned command of a brigade in Major GeneralD.H. Hill's division. In the Seven Days Battles, Anderson led his brigade at Gaines Mill. During the Battle of Malvern Hill on July 1, Anderson commanded both his own brigade and Brig. Gen Winfield Featherston's brigade of James Longstreet's division, as Featherston had been wounded the previous day at Glendale and his brigade's officer corps, having been decimated in the fighting, contained only inexperienced majors and captains. Anderson himself was wounded at Malvern Hill and command of his brigade fell to Col. Charles Tew of the 2nd North Carolina. While recovering, he was part of the defenses around Richmond, Virginia, in July 1862, serving in the 4th Brigade of Major General G.W. Smith's Division.[3]
During the Battle of Antietam, on 17 September 1862, Anderson led his veteran North Carolinians as they defended a portion of the Sunken Road (known as "Bloody Lane") against repeated Union attacks. A Minié ball struck Anderson near his ankle, shattering it. Anderson was transported to Shepherdstown and then by wagon up the Shenandoah Valley to Staunton, Virginia, to recuperate. He hoped to avoid amputation so that he could return to lead his men in the field. He was eventually shipped by train to Raleigh, North Carolina. There his infected foot was amputated, but he died on 17 October 1862 following the surgery.[3]