When you buy a Hebrew slave, he shall serve six years, and in the seventh he shall go free, for nothing.
If he comes in single, he shall go out single; if he comes in married, then his wife shall go out with him.
If his master gives him a wife and she bears him sons or daughters, the wife and her children shall be her master's, and he [the slave who fulfilled his six years] shall go out alone.
But if the slave plainly says, "I love my master, my wife and my children; I will not go out free," then his master shall bring him to God, and he shall bring him to the door or the doorpost. And his master shall bore his ear through with an awl, and he shall be his slave forever.
Exodus 21:2-6 (ESV)
This is fascinating to me.
Slavery in Bible times was entirely different from what it was in the early days of the American south. For one thing, they didn't go out hunting for people whom they could catch and bring back to their land to sell for a profit. Some slaves were prisoners of war. But the slaves discussed in this passage were Hebrews, brothers. They had to sell themselves into slavery sometimes when they got into financial trouble, into too much debt they could not repay. Bankruptcy was not an option in those days. But neither did they throw debtors into debtors' prison as in Victorian England. No, in these ancient days, debtors had to work off their debts by selling themselves into slavery. In other words, they found a wealthy patron who could pay off the debt for them, and then they proceeded to live with him and work for him over the next six years to make it up to him. It was a pretty economically sound solution.
AND... God made provisions to protect the slaves from exploitation. For one thing, they were to be set free after six years. A long time, yes, but anything is more bearable when there is an end in sight.
Presumably, an intelligent slave would know better than to take a wife from within the household of a master he despised. Slaves could make choices, to marry or to remain single, knowing that they would have the option to go free in the seventh year.
Kind, fair masters provided for their slaves in return for good labor. This was not always back-breaking manual labor. Sometimes it was household management or personal assistance (think of Sam Gamgee's relationship with Frodo). Slaves could remain under the protection and provision of a fair master, raise a family and live a good life, if they so desired. It was more like living within the kingdom of a good and righteous king than like being exploited by unfair labor practices.
I do not know how the slave traders in the American south ever could have justified their actions in light of the Bible. Biblical slavery had nothing in common with the atrocities committed by those slave hunters, sellers, and owners.