He was elected President (1848-1852) of the Second Republic of France and subsequently Emperor (1852-1870), reigning as Napoleon III (Second French Empire). In a situation that resembles the case of Louis XVIII of France, the numbering of Napoleon's reign assumes the existence of a legitimate Napoleon II of France who never actually ruled.
Imprisoned after the second of two abortive coup attempts (October 1836 and August 1840), he escaped to the United Kingdom in May 1846, returning after the revolution of February 1848 to win the presidential election December 2 that year on a platform of strong government, social consolidation and national greatness. President Bonaparte then on December 2, 1851 violently overthrew the Second Republic and seized dictatorial powers. He became Emperor exactly one year later and established the Second French Empire. That same year, he began shipping political prisoners and criminals to penal colonies such as Devil's Island or (in milder cases) New Caledonia. On April, 28th, 1855 he survived an attempted assassination.
Napoleon's challenge to Russia's claims to influence in the Ottoman Empire led to France's successful participation in the Crimean War (March 1854-March 1856). He approved the launching of a naval expedition in 1858 to punish the Vietnamese and force the court to accept a French presence in the country. On January 14, 1858 Napoleon escaped another assassination attempt. In May-July 1859 French intervention secured the defeat of Austria in Italy. But intervention in Mexico (January 1862-March 1867) ended in defeat and the execution of the French-backed Emperor Maximilian, and France saw her influence further eroded by Prussia's crushing victory over Austria in June-August 1866.
An important change during his reign was the rebuilding of Paris. This was done to reduce the ability of future revolutionaries to challenge the government. Large sections of the city were razed and the old convoluted streets were replaced with many broad avenues, with the intent of allowing cannon to be used easily within the city. The rebuilding of Paris was directed by Baron Haussmann (1809-1891; Prefect of the Seine 1853-1870).
He also directed the building of the French railway network. The design was very inefficient, however, as all routes lead to Paris. There were lines between Paris and Lyon, Caen, and Marseilles, but no lines connecting the latter cities to each other. Thus to travel from Marseilles to Bordeaux one needed to go via Paris, a great inefficiency. This was economically inefficient, and also militarily made the French far slower to organize than the more rationally organized Prussians.
Hoping to achieve military glory to match his uncle Louis and forced by the diplomacy of the German chancellor Otto von Bismarck, Napoleon began the Franco-Prussian War in 1870. This war proved disastrous, and was instrumental in giving birth to the German Empire. In battle against Prussia in July 1870 the Emperor was captured at the Battle of Sedan (September 2) and was deposed by the forces of the Third Republic in Paris two days later. He died in exile in England on January 9, 1873.