When did slavery end in the US?

Thumbnail showing End of slavery in the US

Slavery is a deeply troubling part of U.S. history, but eventually, all slaves were released, and slavery ended. When did slavery end, and when was