Although Northerners became progressively more outraged about the institution of slavery as the nation approached a civil war, it would be inaccurate to say that Southerners were prejudiced against blacks and Northerners were not. Slavery was actually present in most of the American colonies, but the rapid growth of industrialization in the North and the thin, rocky soil of New England had led to slavery's slow but steady death because of its lack of profitability north of the Mason-Dixon line--not because Northerners had a sudden surge of conscience.
That being said, the North was a safer place for African-Americans for obvious reasons, and there were people who were happy to help provide safehouses for Harriet Tubman's "Underground Railroad", particularly when first one, then another Fugitive Slave Act was passed by Congress in unsuccessful attempts at compromise with the South. Activists like William Lloyd Garrison were very good at galvanizing support for their causes, and although Northerners weren't necessarily the liberal humanitarians the books sometimes portray them as, abolitionist sentiment grew rapidly in the years before the war.
For its part, the South, particularly wealthy planters, worked hard justifying their feelings about blacks, and the slavery system. For many years, Southerners quoted the Bible as they explained to slaves why they (slaves) should be satisfied with their lot in life; after all, it was clearly God's will, Southerners said. Southerners also like to compare slavery to the horrific conditions in many Northern factories, saying that their slaves were fed and clothed and sheltered while factory workers simply worked inhumane hours under awful conditions for little pay.
After slavery and the Civil War ended, African-Americans faced new challenges; in both North and South, many people resented competing with newly freed slaves for jobs. The South, of course, actively created legislation over the years to keep blacks from enjoying any rights at all, while in the North, it was at least possible to live safely, if not completely free of prejudice.