It is believed that the failure of France to put down a slave revolution in Haiti is the event that caused/prompted Napoleon to offer Louisiana for sale to the United States. France controlled the Louisiana territory from 1699 until it was ceded to Spain in 1762. Napoleon in 1800, hoping to re-establish an empire in North America, regained ownership of Louisiana.

With France's failure to put down the revolt in Saint-Domingue, coupled with the prospect of renewed warfare with the United Kingdom, Napoleon wanted to sell Louisiana to the United States. America originally sought to purchase only the port city of New Orleans and its adjacent coastal lands. However, once the offer was made by France America quickly accepted the bargain.

The Louisiana Purchase occurred when Thomas Jefferson was president (the third president) of the United States. In 1803, the U.S. paid fifty million francs ($11,250,000 USD) and a cancellation of debts worth eighteen million francs ($3,750,000 USD) for a total of sixty-eight million francs ($15,000,000 USD, or around a quarter of a billion in 2016 dollars).

More Info: en.wikipedia.org