I'll attempt an answer that won't get banned ...
Short answer is, it didn't. Slavery was an institution in the Western Roman Empire for as long as it existed. When it fell, the Germanic tribes to greater or lesser extents also practiced slavery, and it was common in Anglo-Saxon England. Slavery gradually decreased in early Medieval Europe for the centuries following the fall of the Western Empire, as Europe Christianized and the church tried to discourage enslavement of fellow Christians. However, even after the Norman conquest, almost 10% of the population of England were slaves ( Domesday Book ). In any event this period was also the period of the evolution of Feudalism, and serfdom became the new source of "bound" labor, although obviously serfs are quite different from slaves.
Slavery existed in the Eastern Roman Empire (aka the Byzantine Empire) throughout its existence, as well as in the Muslim world.
It didn't.
The entire concept of ending slavery for moral reasons didn't really germinate until the Enlightenment, or so. The earliest examples of outright bans on slavery in the west originate in the mid 1500's from the crown of Spain and the Swedes.
Then again, because it wasn't an economic cornerstone like it was in the Colonial period, it also didn't enter the public conscious until fairly late. In ancient times it was generally accepted that if an army was defeated, and their home sacked whoever survived would either be killed or enslaved. Women and children were typically enslaved. Men were often killed. In some respects not doing so would have been the crueler thing to do. A state with it's army freshly killed in battle was vulnerable to all manner of problems.
I honestly can't think of a state that bothered to codify laws that banned slavery in the ancient world. You think of any major civilization in that period- various Chinese states, the Romans, the Greeks, the Egyptians, Assyrians, Babylonians, Songhai, Mali, Mayans, Incans- and they had slaves. The scale to which it happened may have differed but they were there.
To answer your question, we must first know what you mean by "ancient slavery."