Exodus 21:2-6 Modern English Version (MEV)
2 If you buy a Hebrew servant, he will serve for six years, but in the seventh he shall go out free without paying anything. 3 If he came in by himself, he shall go out by himself. If he is married, then his wife will go out with him. 4 If his master gives him a wife, and she bears him sons or daughters, the wife and her children shall belong to her master, and he will go out by himself.
5 However, if the servant plainly says, “I love my master, my wife, and my children. I will not go out free,” 6 then his master will bring him to the judges, then he shall also bring him to the door or to the doorpost, and his master shall bore his ear through with an awl, and he shall serve him forever.
Leviticus 25:38-55 Modern English Version (MEV)
38 I am the Lord your God, who brought you out of the land of Egypt, to give you the land of Canaan and to be your God.
The Law About Slavery
39 If your brother who dwells near you becomes poor and sells himself to you, you shall not compel him to serve as a bondservant. 40 But as a hired servant and as a sojourner he shall be with you. He shall serve you until the Year of Jubilee. 41 And then he shall depart from you, both he and his children with him, and he shall return to his own family and to the possession of his fathers. 42 For they are My servants, whom I brought out of the land of Egypt. They shall not be sold as slaves. 43 You shall not rule over him with harshness, but you shall fear your God.
44 Both your male and female slaves, whom you may have, they shall be bought from the nations that are around you. 45 Moreover of the foreigners who sojourn among you and of their families who are with you, who were born in your land, you may also buy from them, and they may be your possession. 46 You may take them as an inheritance for your children after you, for their possession. They shall be your slaves forever. But over your brothers, the children of Israel, you shall not rule over one another with rigor.
47 If a sojourner or foreigner becomes rich by you, and your brother who dwells beside him becomes poor and sells himself to the foreigner or sojourner with you, or to a member of the stranger’s family, 48 then after he is sold he may be redeemed again. One of his brothers may redeem him, 49 or either his uncle or his cousin may redeem him, or any who is near of kin to him of his family may redeem him. Or if he is able, he may redeem himself. 50 He shall calculate with him who bought him from the year that he was sold to the Year of Jubilee, and the price of his sale shall be according to the number of years, according to the time of a hired servant. 51 If there are still many years left until the Jubilee, he shall pay the price proportionately for his redemption as some of the price that he was bought for. 52 If there remain but a few years until the Year of Jubilee, then he shall calculate and pay the price proportionately for his redemption according to his years of service. 53 As a yearly hired servant he shall be treated, and the other shall not rule harshly over him in your sight.
54 If he is not redeemed in these years, then he shall go out in the Year of Jubilee, both he and his children with him. 55 For to Me the children of Israel are servants. They are My servants whom I brought out of the land of Egypt: I am the Lord your God.