2 When you buy a Hebrew slave, he shall serve six years, and in the seventh he shall go out free, for nothing.
3 If he comes in single, he shall go out single; if he comes in married, then his wife shall 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 be her master’s, and he shall go out alone.
5 But if the slave plainly says, ‘I love my master, my wife, and my children; I will not go out free,’
6 then his master shall bring him to God, and he shall bring him to the door or the doorpost. And his master shall bore his ear through with an awl, and he shall be his slave forever. – Exodus 21:2-6
I think the most troubling part of this passage is where the wife comes from. But I think the most reasonable explanation may be that she is the slave owner’s daughter. If that is true, then giving her to him would be a kind of adoption.