Southern Democrats owned about 4 million slaves when the civil war started. Republicans did not own slaves, the party was formed to combat slavery. That is, it formed in 1854 in opposition to expansion of slavery to western states.
Southern Democrats led the rebel way of succession so they could keep their slaves. Today they must settle for illegal aliens.
After the war during reconstruction southern blacks were Republicans.