12אָדוֹן שֶׁמֵּת אִם הִנִּיחַ בֶּן זָכָר הֲרֵי הָעֶבֶד עוֹבֵד הַבֵּן עַד סוֹף הַשֵּׁשׁ אוֹ עַד סוֹף הַשָּׁנִים שֶׁמָּכַר עַצְמוֹ לָהֶן אוֹ עַד שֶׁיִּפְגַּע בּוֹ יוֹבֵל אוֹ עַד שֶׁיְּגַרֵעַ פִּדְיוֹנוֹ וְיִתֵּן הַשְּׁאָר. אֲבָל אִם לֹא הִנִּיחַ בֶּן זָכָר הֲרֵי זֶה יֵצֵא לְחֵרוּת וְאֵינוֹ עוֹבֵד לֹא אֶת הַבַּת וְלֹא אֶת הָאָח וְאֵין צָרִיךְ לוֹמַר שֶׁאֵינוֹ עוֹבֵד שְׁאָר הַיּוֹרְשִׁין. וְהַנִּמְכָּר לְגֵר צֶדֶק אוֹ לְעַכּוּ"ם אֲפִלּוּ הַבֵּן אֵינוֹ עוֹבֵד אֶלָּא כֵּיוָן שֶׁמֵּת הָאָדוֹן יֵצֵא לְחֵרוּת. נִמְצֵאתָ אוֹמֵר שֶׁעֶבֶד עִבְרִי נִקְנֶה בְּכֶסֶף אוֹ בִּשְׁטָר וְקוֹנֶה אֶת עַצְמוֹ בַּחֲמִשָּׁה דְּבָרִים. בְּשָׁנִים אוֹ בְּיוֹבֵל אוֹ בְּגִרְעוֹן כֶּסֶף אוֹ בִּשְׁטַר שִׁחְרוּר אוֹ בְּמִיתַת אָדוֹן בְּלֹא בֵּן וּבְעַכּוּ"ם אוֹ בְּגֵר אֲפִלּוּ הִנִּיחַ בֵּן. מִצְוָה לוֹמַר לוֹ צֵא בִּשְׁעַת יְצִיאָתוֹ. אַף עַל פִּי שֶׁלֹּא אָמַר לוֹ הֲרֵי הוּא יוֹצֵא בְּחִנָּם. וְאֵינוֹ צָרִיךְ שְׁטָר. אֲפִלּוּ חָלָה וְהוֹצִיא רַבּוֹ עָלָיו הוֹצָאוֹת הַרְבֵּה אֵינוֹ חַיָּב לוֹ כְּלוּם שֶׁנֶּאֱמַר (שמות כא ב) "יֵצֵא לַחָפְשִׁי חִנָּם":
12. The following rules apply when a servant's master dies. If the master is survived by a son, the servant must serve the son until the conclusion of the six years, until the conclusion of the years for which he sold himself, until the Jubilee year, or until he deducts the money for the years he worked and pays the remainder. If, however, the master is not survived by a son, the servant is granted his freedom. He need not serve a surviving daughter or the deceased's brother. Needless to say, he need not serve other heirs. When a servant is sold to a convert or a gentile, he is not required to serve even his master's son. Instead, when his master dies, he attains his freedom. Thus, a Hebrew servant can be acquired through the transfer of money or a bill of sale, and can acquire his freedom through one of five means: a) the conclusion of his years of servitude, b) the advent of the Jubilee year, c) by paying money, an amount reduced in consideration of the years he worked, d) through being given a bill of release, and e) through the death of the master without a son, or if the master is a gentile or a convert, even if he is survived by a son. It is a mitzvah to tell a servant: "Go out," at the time of his release. Nevertheless, even if his master does not tell him this, the servant attains his freedom without any cost. Nor is a bill of release required. Even if he had been sick and his master spent much on his medical expenses, the servant has no obligations to the master, as implied by Exodus 21:2: "He shall go free at no charge."