Leviticus 25:35-46 NRSV
35 If any of your kin fall into difficulty and become dependent on you, you shall support them; they shall live with you as though resident aliens. 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 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.
It is hard to appreciate how radical these instructions were from our distant perspective. All of the nations surrounding Israel engaged in slavery. This was the abolition of slavery among the Israelites. They could take slaves from other nations but based on laws from Leviticus and elsewhere in the Old Testament, slaves were treated better than in surrounding nations. There is also a provision against charging interest but it is clearly in the context of someone who is in desperate need.
Leviticus 25:47-55 NRSV
47 If resident aliens among you prosper, and if any of your kin fall into difficulty with one of them and sell themselves to an alien, or to a branch of the alien's family, 48 after they have sold themselves they shall have the right of redemption; one of their brothers may redeem them, 49 or their uncle or their uncle's son may redeem them, or anyone of their family who is of their own flesh may redeem them; or if they prosper they may redeem themselves. 50 They shall compute with the purchaser the total from the year when they sold themselves to the alien until the jubilee year; the price of the sale shall be applied to the number of years: the time they were with the owner shall be rated as the time of a hired laborer. 51 If many years remain, they shall pay for their redemption in proportion to the purchase price; 52 and if few years remain until the jubilee year, they shall compute thus: according to the years involved they shall make payment for their redemption. 53 As a laborer hired by the year they shall be under the alien's authority, who shall not, however, rule with harshness over them in your sight. 54 And if they have not been redeemed in any of these ways, they and their children with them shall go free in the jubilee year. 55 For to me the people of Israel are servants; they are my servants whom I brought out from the land of Egypt: I am the LORD your God.
Yesterday I wrote that there technically was no “sale” of land in Israel. The transactions were lease agreements. The same was true for labor. No Israelite was sold into slavery. They leased their labor for a period of years running from the lease date until the next jubilee. If someone had to sell their land or labor due either to hard times or injudicious action, they would be saved by the jubilee. No one could be permanently alienated from the means of production, namely land and labor.