These are the rules that you shall set before them: When you acquire a Hebrew slave, he shall serve six years; in the seventh year he shall go free, without payment. If he came single, he shall leave single; if he had a wife, his wife shall leave with him. If his master gave him a wife, and she has borne him children, the wife and her children shall belong to the master, and he shall leave alone. But if the slave declares, “I love my master, and my wife and children: I do not wish to go free,” his master shall take him before God. He shall be brought to the door or the doorpost, and his master shall pierce his ear with an awl; and he shall then remain his slave for life. When a man sells his daughter as a slave, she shall not be freed as male slaves are. If she proves to be displeasing to her master, who designated her for himself, he must let her be redeemed; he shall not have the right to sell her to outsiders, since he broke faith with her. And if he designated her for his son, he shall deal with her as is the practice with free maidens. If he marries another, he must not withhold from this one her food, her clothing, or her conjugal rights. If he fails her in these three ways, she shall go free, without payment.
From Parshat Mishpatim. From THE TANAKH: The New JPS Translation According to the Traditional Hebrew Text. Copyright 1985 by the Jewish Publication Society. Used by permission.