Exodus 21:1-6 CJB

1 "These are the rulings you are to present to them:
2 "If you purchase a Hebrew slave, he is to work six years; but in the seventh, he is to be given his freedom without having to pay anything.
3 If he came single, he is to leave single; if he was married when he came, his wife is to go with him when he leaves.
4 But if his master gave him a wife, and she bore him sons or daughters, then the wife and her children will belong to her master, and he will leave by himself.
5 Nevertheless, if the slave declares, 'I love my master, my wife and my children, so I don't want to go free,'
6 then his master is to bring him before God; and there at the door or doorpost, his master is to pierce his ear with an awl; and the man will be his slave for life.