Charles DeWitt Anderson Charles DeWitt Anderson ( July 1827 or 1829 – November 21 , 1901 ) was an American soldier , railway builder , civil engineer , and lighthouse keeper . He served as an officer in the U . S . Army , and later as a Confederate officer during the American Civil War . Anderson was noted for his controversial surrender of Fort Gaines at the Battle of Mobile Bay in August 1864 . Early life and career . Charles DeWitt Anderson was born in July of either 1827 or 1829 in South Carolina . In 1839 his family immigrated by sea to Texas , at the time an independent nation and not a U . S . state until 1845 . During the voyage both of his parents died , and after arriving at the port of Galveston Anderson and his brother were adopted by an Episcopal minister , who raised them both . In 1846 Anderson became the first Texan appointed to the United States Military Academy at West Point . He had been recommended by Texas ' founder , Sam Houston , and he began attending on September 1 . Anderson struggled academically at West Point ; during his sophomore year he was found " deficient " in both French and mathematics , and resigned from the academy on November 13 , 1848 . Despite this , in 1856 Anderson was directly commissioned into the U . S . Army as a second lieutenant on June 27 . He was assigned to the 4th U . S . Artillery and was promoted to first lieutenant on July 6 , 1859 . Anderson served with the 4th in Florida and then in the Utah Territory , and he was there when the Civil War began in 1861 . Acquiring a leave of absence he headed home , and ( after covering about 100 miles of wintry terrain ) Anderson then decided to resign from the U . S . Army , which was accepted effective on April 1 , 1861 . Civil War service . At the beginning of the American Civil War in 1861 , Anderson chose to follow his home state and the Confederate cause . On March 16 he was appointed a first lieutenant in the Regular Confederate Artillery . His first assignment was at Fort Morgan , guarding the entrance to Mobile Bay , Alabama . There he was given command a regular detachment , organized separately from the volunteer forces but attached to the 2nd Alabama Infantry , and was responsible for the installation ' s ordnance . His total force consisted of the remaining regular recruits from the Mount Vernon Arsenal in Alabama , and numbered only two officers and nine enlisted men . On November 9 Anderson entered the volunteer service for good , appointed a major in the 20th Alabama Infantry , and command of his regulars fell to 2nd Lt . Alfred M . O ' Neal . In late 1861 Anderson and the 20th Alabama were stationed at Knoxville , Tennessee , and on February 15 , 1862 , he left the unit to join the staff of Brig . Gen . Adley H . Gladden , posted at Mobile , Alabama . That April during the Battle of Shiloh , Anderson acted as his assistant adjutant general , but following Gladden ' s death in the battle the staff was broken up . The following month Anderson took command of the 21st Alabama Infantry , elected its colonel on May 8 . The regiment became part of the defenses of Mobile , with Anderson commanding it for the remainder of 1862 , all of 1863 , and into 1864 . Fort Gaines . By May 1864 Anderson was an acting brigadier general in the Confederate Army . That fall Union forces were operating against Mobile Bay , and Anderson was given command of Fort Gaines , situated directly across from Fort Morgan and resting on Dauphin Island . On August 5 the Union Navy ran past both forts , landing the infantry of Maj . Gen . Gordon Granger . Both forces then began bombarding Fort Gaines , with the heavy naval shells easily passing through the fort ' s walls . Despite receiving only moderate damage , Anderson ' s men panicked and demanded he surrender , which at first Anderson rejected , but realizing his command was about to mutiny he conceded defeat on August 8 , after three days of shelling . Military historian Bruce Allardice summarized Anderson ' s predicament : Anderson turned over between 818 and 864 men as well as 26 cannon . His superior , Brig . Gen . Richard L . Page , criticized the surrender as a " deed of dishonor and disgrace " and for his allowing Lt . Col . James M . Williams ( Anderson ' s second in command ) to abandon nearby Fort Powell late on August 5 . Page said this despite his own surrender of Fort Morgan two weeks later and after a single day of bombardment . Military historian David J . Eicher considered Anderson ' s actions a " halfhearted attempt to defend the position . " Anderson would spend the rest of the war confined to a military prison in New Orleans , Louisiana , and was paroled in 1865 . David Farragut , the admiral commanding the Union Navy vessels during Battle of Mobile Bay , had Anderson in mind with one of his dying wishes . He requested that the sword he received during Anderson ' s surrender be returned to Anderson " in recognition of his gallantry . " Farragut stated in his official report of the battle " that Anderson had put up a better fight than Page . " Postbellum career and death . Returning to Texas after the conflict ended in 1865 , Anderson found work in the construction of railroads . He was then elected for two terms as Austin ' s chief engineer . Anderson next went back to Galveston , Texas , where he built the Galveston Island Lighthouse . Beginning in 1895 and until his death six years later , Anderson was the lighthouse ' s keeper . He died there , reportedly of the " " , in November 1901 , and was buried in Old Cahill Cemetery in Galveston .