General Pierre Gustave Toutant Beauregard was born near New Orleans, Louisiana, in 1818, of French and Welch ancestry. He attended West Point, from which he was graduated in 1838, and was a student in Major Robert Anderson's artillery class. An outstanding cadet, he stayed on briefly at the Academy as an assistant artillery instructor. Beauregard's expertise was in engineering, and after leaving West Point, he worked on fortifications, chiefly in Louisiana. With the outbreak of the Mexican War, he served as an engineer on the staff of General Winfield Scott. He served with distinction, particularly during the siege of Mexico City, and was brevetted for his valor to major.
After the war, Beauregard returned to Louisiana as an engineer. He was in charge of draining the site of New Orleans, and rose to the rank of captain. In 1860, he was selected as superintendent of West Point, but his announced sympathy for the secessionist cause in Louisiana cut short his tenure. In January 1861, he was transferred after serving only five days as superintendent of the Academy. Shortly after, in February, he resigned from the army and was immediately appointed brigadier general in the Confederate army. He was sent to take command of the forces around Charleston. Combining the qualities of a southern gentleman and a military hero, Beauregard was a celebrated figure in Charleston upon his arrival.