Well that would depend on how you defined the North. Maryland, Delaware, Kentucky, and Missouri all were northern states and all had slaved during much or all of the war. Taking into account the other northern states then every one of them had passed laws outlawing slavery. Most had clauses outlawing new slavery and and immediately freeing slaves in a certain age group while freeing the rest over time over time but by 1840 of the 2,482,000 slaves in the United States fewer than 1200 lived in the Northern states other than Missouri, Delaware, Maryland and Kentucky. By 1850 that number had dropped to less than 250 - all in New Jersey.
So were there slaves in the North during the Civil War? Yes. But even taking into consideration the 4 border south states that remained loyal to the Union 9 out of every 10 slaves still lived in the confederate states.