In 1790, due to the French Revolution and the mistreatment of the gens de couleur (a free mixed-race community) and the slaves, they rose in revolt. It wasn't until 1791 that a slave rebellion was led by Toussaint L'Ouverture
In 1792 and 1794, social equality was granted to the gens de couleur, and abolished slavery in all French colonies. That lasted until 1802 when Napoleon Bonaparte sent his brother-in-law Charles Leclerc to restore full French rule in Saint Domingue. Later L'Ouverture gets deceived by Leclerc and later dies in France of pneumonia in 1803.
By November 1802, yellow fever and malaria killed Leclerc and half of the French troops. Later, Vicomte de Rochambeau, the new French Commander, came and waged a war against the Haitian rebels. Though Rochambeau's reinforcements and supplies were never sufficient enough due to Britain's control over the sea at that time.
By the fall of 1803, L'Ouverture's ally General Jean-Jacques Dessalines defeated Rochambeau, finally ending France's control over Haiti. On January 1, 1804, Dessalines declared Haiti's independence, establishing the first black republic in the Americas.