On January 1, 1863 US President Abraham Lincoln issued the Emancipation Proclamation, which freed all slaves in states which seceeded from the US, except those in areas under Yankee control. Since the "rebellious states" saw themselves as a separate country, the effect was the same as the President freeing the British from Ireland.
Not until the end of the war was there universal emancipation.
In June 1865 federal troops under the command of Major General Gordon Granger arrived in Galveston, Texas to restore federal control to the formerly rebellious state. General Granger's third General Order issued on this date, enforced the Emancipation proclamation and ordered that all remaining slaves in Texas be immediately freed.
On January 1, 1980, Juneteenth became an official Texas state holiday through the efforts of Al Edwards, an African American state legislator. The successful passage of this bill marked Juneteenth as the first emancipation celebration granted official state recognition. Edwards has since actively sought to spread the observance of Juneteenth all across America.