Leviticus 25:36-46

36 Do not take interest in advance or otherwise make a profit from them, but fear your God; let them live with you.
37 You shall not lend them your money at interest taken in advance, or provide them food at a profit.
38 I am the Lord your God, who brought you out of the land of Egypt, to give you the land of Canaan, to be your God.
39 If any who are dependent on you become so impoverished that they sell themselves to you, you shall not make them serve as slaves.
40 They shall remain with you as hired or bound laborers. They shall serve with you until the year of the jubilee.
41 Then they and their children with them shall be free from your authority; they shall go back to their own family and return to their ancestral property.
42 For they are my servants, whom I brought out of the land of Egypt; they shall not be sold as slaves are sold.
43 You shall not rule over them with harshness, but shall fear your God.
44 As for the male and female slaves whom you may have, it is from the nations around you that you may acquire male and female slaves.
45 You may also acquire them from among the aliens residing with you, and from their families that are with you, who have been born in your land; and they may be your property.
46 You may keep them as a possession for your children after you, for them to inherit as property. These you may treat as slaves, but as for your fellow Israelites, no one shall rule over the other with harshness.