Francis II was the last of the Holy Roman Emperors. Four times he fought against France, and it didn't go well the first three times. Each of those times he was defeated by Napoleon. The first time he was forced to cede lands. The second time he was forced to cede the Holy Roman Empire itself, which dissolved after 400 years, and Francis II became Francis I, Emperor of Austria. The third time, he was forced to cede his daughter, Marie Louise, and Francis I became a forced and unwilling ally of Napoleon.
Napoleon was looking for an heir and divorced Josephine because she did not produce one. He went wife shopping amongst the royal families of Europe and found himself a Hapsburg princess courtesy of his new ally. Napoleon and Marie Louise were married by proxy in Vienna and did not meet until two weeks later, upon which she told him "You are much better-looking than your portrait." She settled into the role of Empress of France quite well and the marriage bought a great deal of good will from the people of Austria, who had been quite annoyed with Napoleon for his invasions and such.
Napoleon II was born almost exactly a year later. But that fourth time was soon to come, and Napoleon's ally and the rest of Europe teamed up against him and forced him to abdicate. Marie Louise and her son returned to Austria, never to see Napoleon again. After Napoleon's brief return to power in the Hundred Days, he was defeated at Waterloo and abdicated again, this time naming his four year old son Emperor of France. Napoleon II never took the throne, instead receiving the far lesser title of Duke of Reichstadt in Austria.
The treaties following the Napoleonic Wars made Marie Louise the Duchess of Parma, and all accounts she ruled the small state well. She married again twice and had three more children. Napoleon II's life was cut short by tuberculosis on July 22, 1832, though there is speculation that he was assassinated with poison by Metternich. There Napoleon's direct male line ended. Emperor Napoleon III was Napoleon's nephew.