Exodus 21:4

4 If his master gives him a wife and she bears him sons or daughters, the woman and her children shall belong to her master, and only the man shall go free.

Read Exodus 21:4 Using Other Translations

If his master have given him a wife, and she have born him sons or daughters; the wife and her children shall be her master's, and he shall go out by himself.
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.
“If his master gave him a wife while he was a slave and they had sons or daughters, then only the man will be free in the seventh year, but his wife and children will still belong to his master.

What does Exodus 21:4 mean?

John Gill's Exposition of the Bible
Exodus 21:4

If his master have given him a wife
One of his slaves, a Canaanitish woman, on purpose to beget slaves on her, since all born in his house were his own; this is supposed to be after he was come into his house, and into his service:

and she have born him sons or daughters;
as she might have born him several of the one sort, or the other, if she was given to him quickly after his servitude began:

the wife and her children shall be her master's:
she being his slave, and bought with his money, he had a right unto her, and to the children belonging to her, the birth following the belly; and being born in his house, they were also his. Jarchi here observes, that the Scripture speaks of a Canaanitish woman, for an Hebrew woman went out at the sixth year, and even before the sixth, if she produced the signs, that is, of puberty:

and he shall go out by himself;
without his wife and children: if it be objected to this law, that it is contrary to the law of marriage, which is indissoluble, but by this dissolved; it may be replied, that the servant was not obliged by it to leave his wife, unless he chose it; on complying with certain conditions after mentioned, he might continue with her; besides, she was, according to Jarchi, but his secondary wife, and not only so, the marriage was not lawful, being with a Canaanitish woman, and not agreeable to the Lord; and being also her master's slave, to whom he had a right, he could retain her if he pleased, having only given her to his servant to beget slaves on for him.

California - Do Not Sell My Personal Information  California - CCPA Notice