Today is Juneteenth. Using his War Powers, Abraham Lincoln announced his Emancipation Proclamation in the Fall of 1862. Those War Powers limited the effect of the Proclamation to those states that were in rebellion, Union controlled boarder states and Texas were not affected. Although the Civil War officially ended on May 9th, 1865, battles continued into early June. On June 18th, Union General Gordon Granger took two thousand Union Troops and occupied Galveston. On the 19th he publicly read "general order no. 3" which announced the Emancipation of the last slaves in the US.
Freed slaves celebrated Emancipation on June 19th 1866 and it became an annual Celebration in Galveston, Texas, and over the years and decades spread throughout the Country. It is an Official Holiday in 45 states, including California.
As a final note, the 13th Ammendment to the US Constitution abolished slavery through out the United States. It took effect on December 18th, 1865.