Anderson chose to follow his home state and the Confederate cause, and he resigned from the U.S. Army (accepted on March 3, 1861) to enter service with the Confederate Army. Anderson accepted a commission as colonel of the 1st South Carolina Regulars as of January 28. He was given command of the Charleston harbor area after the capture of Fort Sumter that April. He was promoted to brigadier general on July 19 and transferred to Pensacola, Florida, where he was wounded in the left elbow during the Battle of Santa Rosa Island on October 9.