In the US, slavery was being outlawed legally and gradually in much of the US and territories with final Emancipation Proclamation by Lincoln coming from his power as Executive in war and occupation. Winning the US war ended slavery here.
Slavery is where one person has exclusive right to another’s labor. When a state requires a person to remain on the land we call it something else (serfdom, communism…). Losing and yielding rights to the State is like slavery but probably better described as something else… IMHO