The issue of Slavery is a controversial one. What is Islam’s position on slavery?
Firstly this lecture by Hassanain Rajibali explains the position eloquently, essentially, Islam is against slavery, the ethos is to remove it and make people equal. The issue is that Islam does not just simply say “stop all slavery”, it creates a law system that makes slavery impossible to exist, and at the same time allows the slaves to be rehabilitated into society.
The issue of slavery is an excellent example of how Islam lays down principles, or fundamentals, and then the laws must change to accommodate these principles. For example, the principle is to create an equal, just society, the job of the Jurist is to create laws to facilitate this. In the case of Slavery, the principle and laws were divinely ordained, however laws are not sacred in themselves, it is only the principle that is sacred.