Exodus 21:2-6

2-6"When you buy a Hebrew slave, he will serve six years. The

seventh year he goes free, for nothing. If he came in single he leaves single. If he came in married he leaves with his wife. If the master gives him a wife and she gave him sons and daughters, the wife and children stay with the master and he leaves by himself. But suppose the slave should say, 'I love my master and my wife and children—I don't want my freedom,' then his master is to bring him before God and to a door or doorpost and pierce his ear with an awl, a sign that he is a slave for life. 7-11"When a man sells his daughter to be a handmaid, she doesn't go free after six years like the men. If she doesn't please her master, her family must buy her back; her master doesn't have the right to sell her to foreigners since he broke his word to her. If he turns her over to his son, he has to treat her like a daughter. If he marries another woman, she retains all her full rights to meals, clothing, and marital relations. If he won't do any of these three things for her, she goes free, for nothing.