He was born Napoleone di Buonaparte (Italian: ) in Corsica to a relatively modest family of Italian ancestry from the minor nobility. He was serving as an artillery officer in the French army when the French Revolution erupted in 1789. He rapidly rose through the ranks of the military, seizing the new opportunities presented by the Revolution and becoming a general at age 24. The French Directory eventually gave him command of the Army of Italy after he suppressed a revolt against the government from royalist insurgents. At age 26, he began his first military campaign against the Austrians and their Italian allies—winning virtually every battle, conquering the Italian Peninsula in a year, and becoming a war hero in France. In 1798, he led a military expedition to Egypt that served as a springboard to political power. He orchestrated a coup in November 1799 and became First Consul of the Republic. His ambition and public approval inspired him to go further, and he became the first Emperor of the French in 1804. Intractable differences with the British meant that the French were facing a Third Coalition by 1805. Napoleon shattered this coalition with decisive victories in the Ulm Campaign and a historic triumph over the Russian Empire and Austrian Empire at the Battle of Austerlitz which led to the Dissolution of the Holy Roman Empire. In 1806, the Fourth Coalition took up arms against him because Prussia became worried about growing French influence on the continent. Napoleon quickly defeated Prussia at the battles of Jena and Auerstedt, then marched his Grande Armée deep into Eastern Europe and annihilated the Russians in June 1807 at the Battle of Friedland. France then forced the defeated nations of the Fourth Coalition to sign the Treaties of Tilsit in July 1807, bringing an uneasy peace to the continent. Tilsit signified the high watermark of the French Empire. In 1809, the Austrians and the British challenged the French again during the War of the Fifth Coalition, but Napoleon solidified his grip over Europe after triumphing at the Battle of Wagram in July.
Napoleon then invaded the Iberian Peninsula, hoping to extend the Continental System and choke off British trade with the European mainland, and declared his brother Joseph Bonaparte the King of Spain in 1808. The Spanish and the Portuguese revolted with British support. The Peninsular War lasted six years, featured extensive guerrilla warfare, and ended in victory for the Allies. The Continental System caused recurring diplomatic conflicts between France and its client states, especially Russia. The Russians were unwilling to bear the economic consequences of reduced trade and routinely violated the Continental System, enticing Napoleon into another war. The French launched a major invasion of Russia in the summer of 1812. The campaign destroyed Russian cities but resulted in the collapse of the Grande Armée and inspired a renewed push against Napoleon by his enemies. In 1813, Prussia and Austria joined Russian forces in the War of the Sixth Coalition against France. A lengthy military campaign culminated in a large Allied army defeating Napoleon at the Battle of Leipzig in October 1813, but his tactical victory at the minor Battle of Hanau allowed retreat onto French soil. The Allies then invaded France and captured Paris in the spring of 1814, forcing Napoleon to abdicate in April. He was exiled to the island of Elba off the coast of Tuscany, and the Bourbon dynasty was restored to power. However, Napoleon escaped from Elba in February 1815 and took control of France once again. The Allies responded by forming a Seventh Coalition which defeated him at the Battle of Waterloo in June. The British exiled him to the remote island of Saint Helena in the South Atlantic, where he died six years later at the age of 51.
Napoleon's influence on the modern world brought liberal reforms to the numerous territories that he conquered and controlled, such as the Low Countries, Switzerland, and large parts of modern Italy and Germany. He implemented fundamental liberal policies in France and throughout Western Europe. His Napoleonic Code has influenced the legal systems of more than 70 nations around the world. British historian Andrew Roberts states: "The ideas that underpin our modern world—meritocracy, equality before the law, property rights, religious toleration, modern secular education, sound finances, and so on—were championed, consolidated, codified and geographically extended by Napoleon. To them he added a rational and efficient local administration, an end to rural banditry, the encouragement of science and the arts, the abolition of feudalism and the greatest codification of laws since the fall of the Roman Empire".
The ancestors of Napoleon descended from minor Italian nobility of Tuscan origin who had come to Corsica from Liguria in the 16th century. His parents Carlo Maria di Buonaparte and Maria Letizia Ramolino maintained an ancestral home called "Casa Buonaparte" in Ajaccio. Napoleon was born there on 15 August 1769, their fourth child and third son. A boy and girl were born first but died in infancy. He had an elder brother, Joseph, and younger siblings Lucien, Elisa, Louis, Pauline, Caroline, and Jérôme. Napoleon was baptised as a Catholic. Although he was born "Napoleone di Buonaparte" (Italian: ), he changed his name to the more French-sounding "Napoléon Bonaparte" (French: ) when he was 27.
Napoleon was born the same year the Republic of Genoa, a former commune of Italy, transferred Corsica to France. The state ceded sovereign rights a year before his birth in 1768, was transferred to France during the year of his birth and formally incorporated as a province in 1770, after 200 years under nominal Genoese rule. His father was an attorney who went on to be named Corsica's representative to the court of Louis XVI in 1777. The dominant influence of Napoleon's childhood was his mother, whose firm discipline restrained a rambunctious child. Napoleon's maternal grandmother had married into the Swiss Fesch family in her second marriage, and Napoleon's uncle, the cardinal Joseph Fesch, would fulfill a role as protector of the Bonaparte family for some years. Napoleon's noble, moderately affluent background afforded him greater opportunities to study than were available to a typical Corsican of the time.