Think of it this way -- the Republicans have always been the party of big business; the interests of big business-minded voters are what’s shifted over the years.
In Lincoln’s time, the Republican party was a very new party. In fact, he was only the party’s second Presidential candidate, and its first to win, in 1860. His voters mostly came from Northern states, which were far wealthier and more tied to urban manufacturing than the poorer, agriculture (in other words, slave)-reliant South. It’s around the time a Democratic congressman nearly beat a Republican Senator to death with his cane, in the actual Senate chamber, over slavery. There were plenty of Republican abolitionists who were deeply morally opposed to slavery, but there were also plenty (probably a lot more) who mostly just wanted a booming, modern, international economy, which slavery would’ve held back.
So when did things start to change? When Franklin D. Roosevelt, a Democrat from New York, instituted the New Deal to fight the Great Depression in the 1930s, the parties shifted in a big way. The Democratic Party (previously champions of “limited government”) were now supporting a movement marked by mass job creation, checks on big business, and overall workers’ rights. Those are all (very essential) “big government” sorts of things, which shook the Democrats from their roots.
In the 1960s, President John F. Kennedy, a Democrat from Massachusetts, wanted to pass sweeping civil rights legislation (again, “big government”), including the end of segregation in the South. After his assassination, Lyndon Johnson (himself a Southern Democrat) got the Civil Rights Act passed in 1964. This was essentially the final nail in the coffin; the majority of white Southerners -- resistant to the changes enacted by the Civil Rights Act -- abandoned the Democratic Party and joined the Republican Party, establishing a link between big business favoritism and backwoods racism that endures to this day.
Again, that’s a very simplified version of the story, but that’s the gist of it. You should also check out John Legend’s version of the story -- equally helpful, and apparently already shaping Ye’s political awakening.
Now if Kanye slides into G-Chat with Michael Bay, maybe he’ll be convinced the Transformers also helped end slavery.