1796–1807
Louis XVIII had been vying for the custody of his niece Marie-Thérèse since her release from the Temple Tower in December 1795. He succeeded when Francis II, Holy Roman Emperor, agreed to relinquish his custody of her in 1796. She had been staying in Vienna with her Habsburg relatives since January 1796. Louis XVIII moved to Blankenburg in the Duchy of Brunswick after his departure from Verona. He lived in a modest two-bedroom apartment over a shop. Louis XVIII was forced to leave Blankenburg when King Frederick William II of Prussia died. In light of this, Marie-Thérèse decided to wait a while longer before reuniting with her uncle.
In 1798, Tsar Paul I of Russia offered Louis the use of Jelgava Palace in Courland (now Latvia). The Tsar also guaranteed Louis' safety and bestowed on him a generous pension, though later discontinued payment. Marie-Thérèse finally joined Louis XVIII at Jelgava in 1799. In the winter of 1798–1799, Louis XVIII wrote a biography of Marie Antoinette titled Réflexions historiques sur Marie Antoinette. Moreover, being surrounded at Jelgava with many old courtiers, he attempted to recreate the court life of Versailles, re-establishing various of the former court ceremonies, including the lever and coucher (ceremonies that accompanied waking and bedding, respectively).
On 9 June 1799, Marie-Thérèse married her cousin Louis-Antoine at the Jelgava Palace. Desperate to display to the world a united family, Louis XVIII ordered his wife Queen Marie Joséphine, who at the time was living apart from her husband in Schleswig-Holstein, to attend the wedding. Furthermore, she was to come without her long-time friend (and rumoured lover) Marguerite de Gourbillon. The Queen refused to leave her friend behind, creating an unpleasant situation that rivalled the wedding in notoriety. Louis XVIII knew that his nephew Louis-Antoine was not compatible with Marie-Thérèse. Despite this, he still pressed for the marriage, which proved to be quite unhappy and produced no children.
In 1800, Louis XVIII attempted to strike up a correspondence with Napoleon Bonaparte (by then First Consul of France), urging him to restore the Bourbons to their throne, but the future emperor was impervious to this idea and continued to consolidate his own position as ruler of France.
Louis XVIII encouraged his niece to write her memoirs, as he wished them to be used as Bourbon propaganda. In 1796 and 1803, Louis also used the diaries of Louis XVI's final attendants in the same way. In January 1801, Tsar Paul told Louis XVIII that he could no longer live in Russia. The court at Jelgava was so low on funds that it had to auction some of its possessions to afford the journey out of Russia. Marie-Thérèse even sold a diamond necklace that the Emperor Paul had given her as a wedding gift.
Marie-Thérèse persuaded Queen Louise of Prussia to give her family refuge on Prussian territory. Though Louise consented, the Bourbons were forced to assume pseudonyms. With Louis XVIII using the title Comte d'Isle, named after his estate in Languedoc and at times spelt as Comte de Lille. After an arduous journey from Jelgava, he and his family took up residence in the years 1801–1804 at the Łazienki Palace in Warsaw, which after the partitions of Poland became part of the province of South Prussia. According to Wirydianna Fiszerowa, a contemporary living there at the time, the Prussian local authorities, wishing to honour the arrivals, had music played, but trying to give this a national and patriotic character, unwittingly chose La Marseillaise, the hymn of the French Republic with unflattering allusions to both Louis XVI and Louis XVIII. They later apologised for their mistake.
Initially, Louis resided in the Wasilewski's House, located right next to the Castle Square. However, it soon proved to be too small. In this situation, Ludwika Maria Zamoyska, the sister of the Polish king Stanisław August Poniatowski, offered Louis her nearby palace on the Krakowskie Przedmieście street. Right next to the palace was a church and a monastery of the Discalced Carmelite nuns, where, thanks to the foundation of Louis's aunts, Sophie and Louise, sermons were held in French, which members of the court listened to daily. During the winter, Louis lived in there, while in the summer, he was moving to the so-called White House, small villa-type building in the Łazienki Park, which had been granted to him by the Prussian government.
It was very soon after their arrival that Louis and Marie-Thérèse learned of the death of Tsar Paul I. Louis hoped that Paul's successor, Alexander I, would repudiate his father's banishment of the Bourbons, which he later did. Louis then intended to set off to the Kingdom of Naples. The Count of Artois asked Louis to send his son, Louis-Antoine, and daughter-in-law, Marie-Thérèse, to him in Edinburgh, but the King did not do so at that time. Artois had an allowance from King George III of Great Britain and he sent some money to Louis, whose court-in-exile was not only being spied on by Napoleonic agents but was also being forced to make significant economies, financed as it was mainly from interest owed by the Emperor Francis II on valuables his aunt, Marie Antoinette, had removed from France.
In 1803, Napoleon tried to force Louis XVIII to renounce his right to the throne of France, but Louis refused. In May the following year, 1804, Napoleon declared himself Emperor of the French. In July, Louis XVIII and his nephew departed for Sweden for a Bourbon family conference, where Louis XVIII, the Count of Artois, and the Duke of Angoulême issued a statement condemning Napoleon's move. When the King of Prussia decreed that Louis XVIII would have to leave Prussian territory, and hence Warsaw, Tsar Alexander I invited Louis XVIII to resume residence in Jelgava, which he did. However, having to live under less generous conditions than those enjoyed under Paul I, Louis XVIII decided to embark for England as soon as possible.
As time went on, Louis XVIII realised that France would never accept an attempt to return to the Ancien Régime. Accordingly, in 1805 he reformulated his public policies with a view to reclaiming his throne, issuing a declaration that was far more liberal than his earlier pronouncements. This repudiated his Declaration of Verona, promised to abolish conscription, retain the Napoleonic administrative and judicial system, reduce taxes, eliminate political prisons, and guarantee amnesty to everyone who did not oppose a Bourbon Restoration. The opinions expressed in the declaration were largely those of Antoine de Bésiade, Count of Avaray, Louis's closest advisor in exile.
Louis XVIII was forced once again to leave Jelgava when Tsar Alexander informed him that his safety could not be guaranteed in continental Europe. In July 1807, Louis boarded a Swedish frigate bound for Stockholm, bringing with him only the Duke of Angoulême. This stay in Sweden was short-lived since in November 1807 he disembarked at Great Yarmouth, on the Eastern coast of England. He then took up residence in Gosfield Hall in Essex, leased to him by the Marquess of Buckingham.