The city was founded in 1542 by a Franciscan monk as San Miguel El Grande. It was an important stopover on the Antiguo Camino Real, part of the silver route from Zacatecas, Zacatecas.
The town featured prominently in the Mexican War of Independence. General Ignacio Allende, one of San Miguel's native sons, was a leading player in the war against Spain for independence. Allende, captured in battle and beheaded, is a national hero. San Miguel el Grande renamed itself "San Miguel de Allende" in 1826 in honor of his actions.
By 1900, San Miguel de Allende was in danger of becoming a ghost town. Declared a national historic monument in 1926 by the Mexican government, development in the historic district is restricted in order to preserve the town's colonial character.