Four million slaves were formally freed when the Emancipation Proclamation took effect on January 1, 1863, but with the Civil War still raging, their future was far from certain.