 He resigned his commission in the U.S. Army on April 29, 1861, and traveled home to Virginia.He enrolled in the Confederate service as an adjutant general with the rank of lieutenant colonel.He served on the staff of fellow Virginian Robert E. Lee, rising to chief of staff.