Someone like yourself might ask "If Abraham Lincoln was a liberal, what happened to the Republican Party?
Below is your answer-
The switch began in the Democratic party with the new deal. That began turning the Democratic party more liberal. The Republicans became more conservative in response during the eras of Nixon and Reagan, predominantly, converting conservative Southern Democrats into Republicans.
The Republican party abandoned it's principals during the reconstruction era and the differences between the parties wasn't as big as it is now. There were several notable attempts to found third parties, which tended to be liberal.
Before the Great Depression, less regulation was thought to be healthy for business and beneficial for the populous. Many liberals and many conservatives agreed on this ideal. The Democrats tended to favor larger government with more regulation and the republicans tended to favor smaller government with less regulation, but it wasn't that strict. Teddy Roosevelt was a republican, for example, who was known as the Trust Buster and created the idea of antitrust regulations.
After the great depression, FDR came up with the new deal, which represented the theory that the government can help the people by regulating business and providing direct jobs and social insurance against poverty. That view attracted liberals to the Democratic party.
Nixon's Southern Strategy was an attempt to convince Southern Democrats, who were often Democrats because Lincoln was a Republican, that they should switch their vote, as their conservative views aligned better with the Republican party. Reagan cemented that idea with his Conservative Coalition, bringing together fiscal, social, military, and religious conservatives under the tent of the Republican party, confirming the Republicans as the party of the conservatives.
Lincoln was always against slavery. It was the founding principle of the Republican party. Their initial goal was to stop the spread of slavery into new US territories, under the theory that eventually the free states would outnumber the slave states by enough to vote to amend the Constitution and outlaw slavery. The South knew that and seceded from the Union between Lincoln's election and his inauguration after he was voted in without a single southern electoral vote. He never had an opportunity to free the slaves diplomatically, taking office already at war.
During the war, he saw the opportunity to free the slaves with the emancipation proclamation for 2 war related purposes. First, it gave the North a cause, something it desperately needed, as preserving the union began to seem not worth the bloodshed. Second, it caused massive runaways from the slave population in the South and many of those slaves fought in the Union army in the North. The proclamation specifically did not include the 4 border states that had slaves but remained loyal, however, it was clear that eventually those slaves would be freed too. There was a big risk that those states would switch sides, but Lincoln decided it was worth it.
Lincoln originally was against slavery, but he was racist, as were most in that era. Illinois had laws on the books that made it a virtually all-white state. Lincoln had no experience with black people. He invited Frederick Douglas to the White House in hopes of persuading him to lead the freed slaves to Africa to found a new nation. He learned a lot from Douglas and became much more racially tolerant. However, freeing the slaves was always a long-term goal of his.