Nationalism is the devotion of people to the interests of its nation or the love of one's country to stay independent. Nationalism played a major role in the downfall of Napoleon in that he wanted an empire and his opponent's wanted independence.
As Napoleon was conquering lands and creating a vast empire his troops stressed in the far lands that they conquered life, liberty and equality. Even though Napoleon did not realize it triggered nationalistic feelings among the conquered nations.
Spain who was an ally of France, disobeyed Napoleon's decree. Then in 1808 Napoleon overthrew the Spanish royal family and made his brother Joseph king of Spain. But everything that Napoleon did such as put in a foreign ruler, take away noble privileges offended Spanish pride and created nationalistic feelings. The people of Spain revolted in 1808. The French troops stopped the riots, but the nationalistic spirit was not lost. For the next five years there was warfare in Spain. British troops came to aid Spain. This led to the defeat of Joseph, death of thousands of French troops and it inspired patriots and nationalists of other lands to resist Napoleon. This war between 1808 and 1813 is called The Peninsular War.
In Germany, anti-French feelings broke out. But the French invasions carried German nationalism beyond the small ranks of writers. In 1807 writers attacked French occupation of Germany. This nationalistic feeling spread to the Prussians. In 1806 the Prussians were defeated by the French troops. To drive the French out of Prussia there would have to be a spirit of cooperation and loyalty. To accomplish this there would have to be social and political reforms. A reformer said that if social abuses were eliminated the Prussians could fight with national honor. Military reforms improved the Prussian army. In the War of Liberation(1813), the soldiers showed great feelings of patriotism and nationalism. And the French were driven out of Prussia. Russia, who was an ally of France went against the word of Napoleon. So Napoleon decided to invade Russia. Napoleon's Grand Army had 700,000 people in it. Most of soldiers were not French and didn't care for the war. In 1812 when Napoleon began the invasion, Russia retreated. As they were retreating they burned all crops which were valuable. When Napoleon reached Moscow, the Russians burned the city. Even worse the winter was in a few months. The Russians also destroyed the food supply to Napoleon. Many soldiers starved to death. Napoleon decided to retreat back to France. On the way back Russian Cossacks slaughtered the soldiers who fell behind. Napoleon abandoned his army and went back to France.
In 1813 almost every nation in Europe joined in the final coalition against France. Napoleon raised a new army but couldn't replace the equipment lost in Russia. In October 1813 allied forces from Russia, Austria, Prussia, and Sweden defeated Napoleon at Leipzig. By April 1814 the coalition occupied Paris, Napoleon was exiled to the island of Elba. The coalition made peace with France. They restores Bourbon monarchy to throne in the person of Louis.
However Napoleon escaped Elba and returned to France in march of 1815. Louis ordered his troops to stop Napoleon, but no one did. As Napoleon entered Paris he got a cheer. He raised a new army and on June 18 1815 he moved against the allies in Belgium. There the Prussians and the British defeated Napoleon at the Battle of Waterloo. These days of Napoleon trying to regain power are called the Hundred Days. This time they sent him to St. Helena a lonely island near Africa. There he died in 1821.
Nationalism was an enemy to Napoleon because it led to the decline of his empire. And the nationalistic feeling that was felt between his opponent's eventually destroyed him.