While more can always be said, this answer by /u/dean84921 covers your question.
Slave owners were very active politically from the beginning of the Revolution and acted as a strong lobby. The application of the Décret du 16 pluviôse (1794) abolishing slavery had failed in many parts of the French Empire like in Reunion and île Maurice. The Girondins and the Jacobins of the Convention were close to the abolitionists of the Société des Amis des Noirs, and many slaveowners and creoles disagreed with them. In 1793, the Békés (white planters) had revolted in Martinique in anticipation of abolition, joining the royalist cause. The British had helped their grievances by invading the island in 1794, maintaining slavery, as they did in Sainte-Lucie and Tobago.
By 1802 and the End of the Second Coalition War, the colonies were restituted to the French, with their slaves. Therefore, you had a double system : colonies like Martinique, Sainte-Lucie and Tobago where slavery was still effective and colonies like Guadeloupe, Guyane or Saint-Domingue, where the 16 pluviôse proclamation still applied in theory. In theory because Guyane, for example, had instigated the euphemism "forced labor" in 1800 instead of slavery, and so did Saint-Domingue.
At first, Napoleon had no intention to reestablish slave ownership, but pressure by the colonists' lobbies (notably the Hôtel de Massiac Club), unrest in the islands (real or invented, to scare the Consulate), the failure of the first implementation, and vile economic calculations led to the 30 floréal law (1802) reestablishing slavery in the colonies restituted to the French (Martinique, Sainte-Lucie and Tobago). In theory, slavery remained illegal in Guadeloupe, but general Richepanse took over the island militarily in a coup to maintain slave ownership. Similar movements happened in other French possessions where the 30 floréal law did not apply, leading to several other decrees allowing slavery in order to quell the unrest.
In brief, Napoleon had no real ideological motivation in reestablishing slavery at first, but it was a "cheap" way to pacify and rebuild islands and colonies that were vital economically for the future French Empire. Of course, I write "cheap" because it was horribly paid by the slaves in blood and tears. Infighting had plagued France since 1793, and Napoleon's 18 brumaire coup was supposed to be a way to put an end to Civil War and make France great again. In the end, putting "national interests" before any moral considerations would become an ideology in itself, burying the Revolution's ideals in the name of power and greed.