There had been abolitionists (mostly in the north) before the U.S. was even a country. The Quakers, for example, had always been strongly opposed to slavery. The abolitionist movement continued to grow all through the 1800s, but even by the time of the Civil War, the abolitionists did not have the numbers or the political power to take on the southern wealthy plantations. The only reason that abolition happened was that the abolitionists joined up with the northern industrialists, who saw the southern plantations as choking northern industrialism and were preventing the U.S. from joining the rest of the world as a strong industrial nation. So it was kind of “the enemy of my enemy is my friend” situation. While some industrialists were also abolitionists, as a whole, most industrialists didn’t own slaves and didn’t give two hoots about the entire slavery issue, and most abolitionists really didn’t give two hoots about northern industrial factories. But, by joining together, they managed to overpower the entire south, politically.
Thinking that the entire North was anti-slavery is really failing to understand the Northern side of the Civil War conflict.
Even among abolitionists, most felt that blacks were inferior. The abolitionists just felt that it was cruel to enslave those inferior blacks. Even Abraham Lincoln himself felt that blacks were inferior, though his opinion of black intellectual ability did improve as the years went by. There were a few abolitionists who felt that blacks were intellectually equal to whites, but they were the minority.
Lincoln also originally wanted to send the blacks back to Africa. He only changed his mind because he felt that the plan wouldn’t work from a logistical point of view. If he could have found a way to do it that would not have resulted in mass starvation and major problems, he would have still favored it. To be fair, his opinion on this was at least partially because he did not think that blacks and whites would be able to live in harmony after the way that blacks had been treated since the formation of the country, not so much because of racism or any sort of white nationalism.
So in the North, blacks were free, but there was also a lot of racism and the majority of people believed that blacks were inferior. It wasn’t all happy times for blacks in the North.
But, as Chronos said, Northerners were a lot better than Southerners. In the South, the entire culture, social structure, and political structure was designed to keep the black man down and in his place.
Legally, at least at the state level, blacks in the North were free and they could vote. But in actual practice, things were not so clear-cut. Blacks were routinely turned away from voting places, or were intimidated into not showing up in the first place. Black votes were often “lost” (Oh, you’re black? Let me put your ballot over here in this “special” container…). Some places had poll taxes, literacy tests, difficult registration procedures, and other methods to prevent blacks from voting.
Things were still bad enough in the 1960s that specific laws had to be passed to prevent things like polling taxes, literacy tests, and other things that were still being used to suppress the black vote.