A word of caution: we should be a bit hesitant to cite Wikipedia, which has
more than once been shown to be unreliable in terms of its information and quality control. Though it's improving, it can still be easily manipulated. There's
even software to detect the reliability of its entries.
That said, Exxtol is correct that there was no Dominican Republic as we know it before Haiti annexed the eastern half of the island. In fact, when Haiti declared its freedom in 1804, the eastern portion of the island was under the nominal control of...FRANCE. French general Ferrand had deposed his fellow general Kerveseau, and established control with what were then called "dom?nico-espa?oles" (i.e., residents of Spanish Santo Domingo, as against Saint-Domingue) of the eastern 2/3rds of Hispaniola. Although the Haitians had more than once declared all slaves free across the island and instituted this with the 1804 declaration of independence, Napoleon and Ferrand wanted to maintain slavery, and in 1805 Ferrand attempted to permit a form of it for minors. Dessalines thus launched an invasion eastward in 1805, heading south, with Henri Christophe marching eastward and north, to seize control from Ferrand. Henri-Christophe routed the opposition in Santiago, and then he and Dessalines joined forces at the walls of Santo Domingo and laid siege for 21 days, until a French naval force under Missiessy brought relief. Dessalines returned to Haiti, and on the way--and this is the controversial issue--the Haitian troops committed a number of depredations, including the razing of Monte Cristi, Cotu?, San Francisco de Macor?s, La Vega, Moca, Santiago, and Monte Plata, among other places. Crist?bal supposedly massacred 500 people in a church in Moca, and a similar massacre occurred in Santiago.
For the next three years Ferrand led the eastern portion of the island with the consent of the dom?nico-espa?oles bourgeoisie (burguesia), and a number of French former slaveholders who'd fled to Cuba and France were invited to resettle in Santo Domingo, and did so. Things went okay until 1808, when Napoleon, as part of his imperial designs deposed the Spanish King Fernando VII and placed his brother on the throne, which led the Spanish-affiliated bourgeoisie in the eastern portion of the island to rebel against Ferrand and the French. But get this: they were aided by...P?tion, who presided over southern Haiti, and Christophe, who was Emperor of a northern Haitian kingdom! Why? Because both men, who'd taken control after the assassination of Dessalines, wanted the pro-slavery French ousted, and they also worried that the French could launch invasions against them. They were also aided by the Spanish colony of Puerto Rico, and eventually defeated--routed--the French at the end of 1808 in Palo Hincado, in el Seybo. Ferrand, so disgraced, committed suicide. The dom?nico-espa?oles decided to resume being a Spanish colony, recognize Fernando VII, and name the hero of victory, S?nchez Ram?rez, as governor. Santo Domingo, however, remained under the control of French general Du Barquier, so they besieged the capital, and English naval forces blockaded the city (as they'd done to the French in Haiti several years before), finally forcing the French surrender in 1809, at which point the eastern portion passed into the control of Spain (La Espa?a Boba).
This was a generally recognized difficult period, in which slavery persisted in the eastern portion of the island, there were several failed insurrections (one led by an Italian, one led by slaves near Santo Domingo), and the economic situation was a disaster. After Christophe committed suicide in 1821, Haitian president Boyer unified both halves of Haiti, and then decided to unify the entire island. Representatives from Beller, Dajab?n, Montecristi, and other cities seeking to end slavery went to Port-au-Prince to request that Haiti accept them into its union. This occurred, Boyer freed all the slaves in these cities (as per Haitian law), and as a result, N??ez de C?ceres staged a coup d'?tat, overthrowing the Spanish governor and declaring a new state, Hait? Espa?ol. Although N??ez de C?ceres had promised the mixed-race commander Pablo Al? that he would free slaves in the eastern portion, when he declared independence in December 1821 he did not do so, which enraged the enslaved population of Santo Domingo Espa?ol. Meanwhile, he was seeking to join the eastern portion of the country with Gran Colombia under the leadership of Sim?n Bol?var (just imagine if that had happened!), who he also realized had been aided in its battle against Spain by...HAITI, under P?tion. He sent a delegation to Port-au-Prince to sign a treaty establishing trade, friendship and mutual defense, but Boyer decided that he would unite both countries instead, and invaded, so that in February 1822, the entire island came under the aegis of Haiti. Immediately slavery was abolished across the entire island (to the eternal rage of the slaveholders; keep in mind that this was more than 40 years before the US and 60 before Brazil did so). Among the things that Boyer instituted was land distribution to the former slaves; the French legal codes (which are still in place in part), based on both Napoleonic civil law and the ideas of the French Revolution; and general development of the agricultural sector, including the invitation of former US enslaved people to emigrate to Saman? in 1824.
It was not until 1844 that Trinitaria, led by Duarte and having conspired with Haitians under H?rard to exile Boyer, and then convinced France's ambassador to Haiti to accept a plan that would provide the nascent republic with arms and funding, as well as protection, was able to join with
hateros in the east and the mercantile elite to declare independence, and the Dominican Republic, so named, came into being.