It's important to mention that of all the francophone settlements on the North American continent, only Louisiana actually adopted Napoleonic Code before being absorbed by the USA. Why, you might ask?
All French territory, including Louisiana, was ceded away after the Seven Years War. Canada went to Britain, Louisiana was sneakily traded to Spain to compensate for the loss of Florida. This would not remain so for long, however.
The American Revolution rolled along and ended with the new nation claiming all territory north of Florida, east of the Mississippi, and south of a vaguely defined northern borderland. The Louisiana territory would remain in the hands of the Spanish.
French settlers were not limited to the boot of Louisiana and Canada as a significant number of francophone settlers lived in Michigan, Illinois, Iowa, and Missouri. However, all of these settlements underwent an intermediary period of British rule before being absorbed by the USA. The British established their civil code in these territories after their acquisition and displaced French royal law (remember that France was still a kingdom at this point, pre-Revolution). What we know as the state of Louisiana was unaffected by this change of legal code and kept the Spanish legal code of the cabildo instead.
Eventually this Corisican named Napoleon started making a fuss in France got himself installed as emperor. He was able to take control of Spain, put his brother on the throne, and most importantly to our story, cede Louisiana back to France. He originally intended to restart France's overseas empire, but the Napoleonic War started up again and his lack of cash, coupled with his army's failure in Haiti, caused him to abandon his overseas plans for now in favor of making a quick buck selling the territory to the Americans.
At this point almost all of the settlers are French-speakers, though their primary loyalty is to their wallets and not any crowns or revolutions. Nevertheless they welcomed the new French governor for the few months he actually spent in the colony. As it turns out, those few short months were very productive and the governor, Pierre Clement de Laussat, managed to abolish the cabildo legal code and establish Napoleon's post-Revolution legal code. The Louisiana's may not have particularly cared for Napoleon, but they were suspicious of the Americans who were essentially military occupiers who might actually enforce the laws the French and Spanish had been so kind as to ignore.
The new American governor, William Claiborne, did not enter the colony from a position of strength. They were suspicious that he was essentially a military occupier (he essentially was) and that his rule would cause a big disruption of business. The last transfer of power had been marked by a revolt, when Louisiana threw out the new Spanish governor in 1768 when he tried to but into their business. Claiborne managed to ingratiate himself with the settlers through a number of acts that revolved around changing as little as possible and rocking the boat. Rather than introduce another brand new set of legal codes right after the French had put Napoleonic Code in place in 1803, Claiborne simply let them be.
There would be a number of changes to the legal code throughout the centuries (it's now more of a hybrid between Napoleonic and civil code) but a sense of tradition at least maintained the form of Napoleonic code into the present.
Source: