President Abraham Lincoln’s Emancipation Proclamation, effective on Jan. 1, 1863, declared that the enslaved in Confederate-controlled areas were free.
Texas was the last Confederate territory reached by the Union army. On June 19, 1865—Juneteenth—U.S. Army general Gordon Granger arrived in Galveston, Texas, to proclaim the war had ended and so had slavery (in the Confederate states).
Slavery was only ended in Kentucky and Delaware by the passing of the 13th Amendment to the US Constitution in Dec. 1865. The 13th Amendment abolished slavery and involuntary servitude, except as punishment for a crime.
This Thursday, President Biden signed the Juneteenth bill, creating a new federal holiday for June 19th, to commemorate the end of slavery in the U.S.