 Anderson was then appointed assistant adjutant general to Maj. Gen. W. H. T. Walker of the Georgia State militia located in Pensacola, Florida.When Walker's brigade was transferred to Virginia to join the Army of Northern Virginia in July 1861, Anderson went with him.After Walker resigned, Anderson remained in Confederate service and was promoted to the rank of Major.