Slavery is inherently immoral, divorce is immoral too.
The same explanation about divorce given by Jesus can be applied to slavery.
"They say to him: Why then did Moses command to give a bill of divorce, and to put away? He saith to them: Because Moses by reason of the hardness of your heart permitted you to put away your wives: but from the beginning it was not so." -Matthew 19:7-8.
God only permited slavery, and He commanded the Hebrews to treat them in no harsh manner, because of the hardness of the heart of men. But from the beginning men were entitled to have soverignty on his own body. Slavery and divorce are consequences of the Fall, since every man is a slave of their own sins and divorced from salvation by nature. Our Lord Jesus Christ gave us the oppotunity to remarry him (God), since we are the Church and the Church is the bride of Christ, and to get free from our master that is the sinfull nature of this world.