A common misconception is that Cinco de Mayo celebrates Mexican independence from Spain; it doesn’t. Independence from Spain is on the 16th of September, while Cinco de Mayo celebrates the victory of the battle of Pueblo.
Read about it here.
“The Battle of Puebla was not an isolated incident: there is a long and complicated history that led up to it. In 1857, the “Reform War” broke out in Mexico. It was a civil war and it pitted Liberals (who believed in separation of church and state and freedom of religion) against the Conservatives (who favored a tight bond between the Roman Catholic Church and the Mexican State.)”
Essentially, this reform war left Mexico bankrupt, and in debt to several countries; particularly France.
“This angered Great Britain, Spain and France, countries which were owed a great deal of money. The three nations agreed to work together to force Mexico to pay.”
“In December 1861 armed forces of the three nations arrived off the coast of Veracruz and landed a month later, in January 1862. Desperate last-minute diplomatic efforts by the Juarez administration persuaded Britain and Spain that a war that would further devastate the Mexican economy was in no one’s interest, and Spanish and British forces left with promise of future payment. France, however, was unconvinced and French forces remained on Mexican soil.”
To make a long story short, the French campaign into Mexico was unsuccessful; which eventually led to the celebration of Cinco de Mayo (if you prefer a slightly longer version of the story, follow the link above.)