not all slaves in the Southern states were freed at the end of the Civil War. Those slaves that were in areas controlled by the Union Army before the enactment of the Emancipation Proclamation legally remained slaves until the 13th Amendment was ratified.
Sort of puts a dent in the popular conception of the North fighting to free the slaves, doesn’t it? They were fighting to keep slave states in the Union.