Back in the day it was a party called “Democratic” that supported slavery, and a party called “Republican” that opposed it. Those two parties are not the same parties that we have today, even though the same names are still used. And in fact, the modern party closest to the Democrats of the 1800s is the party now called “Republican”.