Human habitation in present-day Mexico dates to ~15,000 BCE, with complex civilizations (Olmecs, Maya, Teotihuacan, Aztecs) flourishing for millennia.
However, the modern Mexican nation-state was founded on September 16, 1821, when the Treaty of Córdoba formally recognized Mexico's independence from Spain after an 11-year war (1810–1821) sparked by Miguel Hidalgo's Grito de Dolores.
September 16 (Hidalgo's 1810 call to arms) is celebrated as Independence Day—not the 1821 formal recognition.