Antonio de Padua Maria Severino Lopez de Santa Anna y Pérez de Lebron was born in Xalapa, Veracruz, Nueva Espana, on 21 February 1794. He was from a respected Spanish colonial family, he and his parents, Antonio Lopez de Santa Anna and Manuela Perez de Lebron, belonged to the elite criollo racial group of American-born Spaniards. His father served for a time as a sub-delegate for the Gulf Coast Spanish province of Veracruz. Santa Anna's parents were wealthy enough to send their son to school.
16-year-old Santa Anna joined the Fijo de Veracruz infantry regiment as a cadet against the wishes of his parents, who wanted him to pursue a career in commerce. In September 1810, secular cleric Miguel Hidalgo y Costilla rebelled against Spanish rule, sparking a spontaneous mass movement in Mexico's rich agricultural area, the Bajio. Santa Anna was wounded in the left hand by an arrow during the campaign under Col. Arredondo in the town of Amoladeras, in the state of San Luis Potosí. In 1813, Santa Anna served in Texas against the Gutierrez–Magee Expedition, and at the Battle of Medina, in which he was cited for bravery. He was promoted quickly, he became a second lieutenant in February 1812.
In 1816, Santa Anna was promoted to captain.When royalist officer Agustin de Iturbide changed sides in 1821 and allied with insurgent Vicente Guerrero, fighting for independence under the Plan of Iguala, Santa Anna also joined the fight for independence. Santa Anna rose to prominence fighting for independence by quickly driving Spanish forces out of the vital port city of Veracruz and Iturbide rewarded him with the rank of general.
In May 1823, Santa Anna was sent into a kind of military exile with his appointment to command in Yucatan. The election of 1828 was quite different, with considerable political conflict in which Santa Anna became involved. Even before the election, there was unrest in Mexico, with some conservatives affiliated with the Scottish Rite Masons plotting rebellion. The governor had thrown his support to the rebels, and in the aftermath of the rebellion's failure, Santa Anna as vice-governor stepped into the governorship. In 1828, Santa Anna supported mixed-race hero of the insurgency, Vicente Guerrero, who was a candidate for the presidency. Manuel Gomez Pedraza won the indirect elections for the presidency, with Guerrero coming in second. Santa Anna rebelled against the election results in support of Guerrero. Santa Anna issued a plan at Perote that called for the nullification of the election results, as well for a new law expelling Spanish nationals from Mexico, believed to be in league with Mexican conservatives. Santa Anna's rebellion initially had few supporters, southern Mexican leader Juan Avarez joined Santa Anna's rebellion, and Lorenzo de Zavala, governor of the state of Mexico, under threat of arrest by the conservative Senate, fled to the mountains and organized his own rebellion against the federal government. Zavala brought the fighting into the capital, with his supporters seizing an armory, the Acordada. In these circumstances, president-elect Gomez Pedraza resigned and soon after left the country. This cleared the way for Guerrero to become president of Mexico. Santa Anna gained prominence as a national leader in his role to oust Gomez Pedraza and as a defender of federalism and democracy. An explanation for Santa Anna's support of Guerrero is that Gomez Pedraza had been in favor of Santa Anna's proposed invasion of Cuba, if successful, and if not, "Mexico might rid himself of an undesirable pest, namely Santa Anna.
Santa Anna was elected president on 1 April 1833, but while he desired the title, he was not interested in governing. "It annoyed him and bored him, and perhaps frightened him. Santa Anna's vice president, liberal Dr. Valentin Gomez Farías took over the responsibility of the governing of the nation. In 1835, it replaced the 1824 constitution with the new constitutional document known as the "Siete Leyes" ("The Seven Laws"). Santa Anna dissolved the Congress and began centralizing power. His regime became a dictatorship backed by the military.
Santa Anna marched north to bring Texas back under Mexican control by a show of brute merciless force. His expedition posed challenges of manpower, logistics, supply, and strategy far beyond what he was prepared for, and it ended in disaster. To fund, organize, and equip his army he relied, as he often did, on forcing wealthy men to provide loans. He recruited hastily, sweeping up many derelicts and ex-convicts, as well as Indians who could not understand Spanish commands. On 6 March 1836, at the Battle of the Alamo, Santa Anna's forces killed 189 Texian defenders and later executed more than 342 Texian prisoners, including James Fannin at the Goliad Massacre (27 March 1836). These executions were conducted in a manner similar to the executions he witnessed of Mexican rebels in the 1810s as a young soldier. However, the defeat at the Alamo bought time for General Sam Houston and his Texas forces. During the siege of the Alamo, the Texas Navy had more time to plunder ports along the Gulf of Mexico and the Texian Army gained more weapons and ammunition. Despite Sam Houston's lack of ability to maintain strict control of the Texian Army, they defeated Santa Anna's much larger army at the Battle of San Jacinto on 21 April 1836. The Texans shouted, "Remember Goliad, Remember the Alamo!" The day after the battle, a small Texan force led by James Austin Sylvester captured Santa Anna. They found the general dressed in a dragoon private's uniform and hiding in a marsh.