Louis-Stanislas-Xavier was born on November 17, 1755 in the Palace of Versailles, Versailles, France, the fourth son of the dauphin Louis, the son of King Louis XV. At birth, he received the title of Count of Provence but throughout most of his life he was known as "Monsieur." After the death of his two elder brothers and the accession of his remaining elder brother as Louis XVI of France in 1774, he became heir presumptive.
The birth of two sons to King Louis XVI, left him third in line to the throne of France. He was living in exile in Westphalia when the King was guillotined in 1793. On the king’s death, Louis-Stanislas-Xavier declared himself Regent for his nephew, the new King Louis XVII. On the 10-year-old king’s death in prison on June 8, 1795, Louis-Stanislas-Xavier proclaimed himself as King Louis XVIII.
In 1814, he gained the French throne with the assistance of Charles Maurice de Talleyrand after Napoleon's downfall. Eventually, he fled Paris on the news of the return of Napoleon, but returned after the Battle of Waterloo had ended Napoleon's rule of the Hundred Days.
King Louis' chief ministers were at first moderate, including Armand Emmanuel, Duc de Richelieu, and Élie Decazes. The ultraroyalists, led by Louis's brother, the Comte d'Artois (later King Charles X), triumphed after the assassination of the count's son, Charles Ferdinand, Duc du Berry. The new ministry headed by the Comte de Villèle was thoroughly reactionary.