Peace Light,
When Prophet Muhammad peace be upon him received the Divine Revelations of Islam, slavery among the Pagan Arabs, Jews and Christians was quite common. When he came with Allah Almighty's True Religion of Islam, he gradually eliminated slavery. He couldn't enforce it all at once, because it would've caused Islam to be an unsuccessful religion toward freeing slaves, and would certainly have broken Islam's system for ending slavery.
By gradually freeing slaves and making it be acceptable to the society of many different pagan cultures and traditions, the idea of eliminating slavery became powerful enough that after Prophet Muhammad peace be upon him died, the freed slaves remained free and non of them was ever enslaved again.
Prophet Muhammad peace be upon him said:
Narrated Abu Musa Al-Ash'ari: "The Prophet said, "Give food to the hungry, pay a visit to the sick and release (set free) the one in captivity (Translation of Sahih Bukhari, Food, Meals, Volume 7, Book 65, Number 286)"
I'll leave you with an article that explains Islam and it's dealings with "slavery":
http://www.free-minds.org/slaves.htm
Peace and Blessings be to the Believers