 Just prior to the start of the American Civil War, Anderson was appointed a captain in the Florida Militia on January 11, 1861.Soon after Florida's secession, Anderson was one of three deputies (delegates) from Florida to the Provisional Congress of the Confederate States, beginning February 4 and resigned on May 2.He accepted a commission as the Colonel of the 1st Florida Infantry on April 1, and initially served under Braxton Bragg in Pensacola.