"When you acquire a Hebrew servant" (Exodus 21:2). Scripture speaks of one sold by the court for his theft [a thief who cannot repay], that he serves the master and serves the son [if the master dies during the term]. Or perhaps it speaks only of one who sells himself? When it says, "And if your brother becomes poor and is sold to you" (Leviticus 25:39), one who sells himself is already addressed there. So what does "When you acquire a Hebrew servant" teach? It speaks of one sold for his theft, that he serves the master and serves the son. "When you acquire a Hebrew servant" - Scripture speaks of a son of Israel. Or perhaps only of the [Canaanite] servant belonging to a Hebrew? And how would I uphold "You shall make them an inheritance for your children after you" (Leviticus 25:46)? Of one taken from a heathen. But of one taken from an Israelite I might hear that he serves six years and goes free in the seventh; the verse teaches, "If your brother, a Hebrew, is sold to you" (Deuteronomy 15:12). Since the verse need not say "the Hebrew" - for it already said "your brother" - what does "the Hebrew" teach? It is set free to be compared by a gezeira shava [a verbal analogy]: "Hebrew" is said here and "Hebrew" is said there [in Deuteronomy]; just as the "Hebrew" said there speaks of a son of Israel, so the "Hebrew" said here speaks of a son of Israel. And though there is no proof of the matter, there is a remembrance of the matter, as it is said, "the God of the Hebrews has met with us" (Exodus 5:3), and it says, "and the fugitive came and told Abram the Hebrew" (Genesis 14:13). Rabbi says: One might think you should call him "servant" as a term of disgrace; the verse teaches, "When you acquire a Hebrew servant" - against his will [reluctantly] the Torah called him a servant. "When you acquire a Hebrew servant" - why is it said? To include the convert, the words of Rabbi Eliezer. Rabbi Ishmael says: It is not needed - if an Israelite serves, shall the convert not serve? Were I to argue: if the Israelite serves six and the convert serves twelve, you would say it is enough for what is derived to be like its source; just as the Israelite serves six, so the convert serves six. Because it says, "and if he has nothing, he shall be sold for his theft" (Exodus 22:2), I might hear forever; the verse teaches, "six years he shall serve" - this tells that he serves six and goes free in the seventh.
The Hebrew Servant Sold by the Court for His Theft
Yalkut Shimoni on Torah 310:1
(שמות כא ב) כִּי תִקְנֶה עֶבֶד עִבְרִי, בְּנִמְכַּר בְּבֵית דִּין בִּגְנֵבָתוֹ הַכָּתוּב מְדַבֵּר, שֶׁיְּהֵא עוֹבְדוֹ וְעוֹבֵד אֶת הַבֵּן. אוֹ אֵינוֹ מְדַבֵּר אֶלָּא בְּמוֹכֵר עַצְמוֹ, כְּשֶׁהוּא אוֹמֵר "וְכִי יָמוּךְ אָחִיךָ עִמָּךְ וְנִמְכַּר לָךְ", הֲרֵי בְּמוֹכֵר עַצְמוֹ אָמוּר, וּמַה תַּלְמוּד לוֹמַר כִּי תִקְנֶה עֶבֶד עִבְרִי, בְּנִמְכַּר בִּגְנֵבָתוֹ הַכָּתוּב מְדַבֵּר, שֶׁיְּהֵא עוֹבְדוֹ וְעוֹבֵד אֶת הַבֵּן. כִּי תִקְנֶה עֶבֶד עִבְרִי, בְּבֶן יִשְׂרָאֵל הַכָּתוּב מְדַבֵּר. אוֹ אֵינוֹ אֶלָּא בְּעַבְדּוֹ שֶׁל עִבְרִי, וּמָה אֲנִי מְקַיֵּם (שם, מו) "וְהִתְנַחַלְתֶּם אֹתָם לִבְנֵיכֶם אַחֲרֵיכֶם", בְּנִלְקַח מִן הַגּוֹי, אֲבָל נִלְקַח מִיִּשְׂרָאֵל שׁוֹמֵעַ אֲנִי יְהֵא עוֹבֵד שֵׁשׁ וְיוֹצֵא בַּשְּׁבִיעִית, תַּלְמוּד לוֹמַר "כִּי יִמָּכֵר לְךָ אָחִיךָ הָעִבְרִי", שֶׁאֵין תַּלְמוּד לוֹמַר הָעִבְרִי, שֶׁכְּבַר נֶאֱמַר "אָחִיךָ", וּמַה תַּלְמוּד לוֹמַר "הָעִבְרִי", אֶלָּא מֻפְנֶה לְהַקִּישׁ לָדוּן גְּזֵרָה שָׁוָה, נֶאֱמַר כַּאן עִבְרִי וְנֶאֱמַר לְהַלָּן "עִבְרִי", מָה עִבְרִי שֶׁנֶּאֱמַר לְהַלָּן בְּבֶן יִשְׂרָאֵל הַכָּתוּב מְדַבֵּר, אַף עִבְרִי שֶׁנֶּאֱמַר כַּאן בְּבֶן יִשְׂרָאֵל הַכָּתוּב מְדַבֵּר. וְאַף עַל פִּי שֶׁאֵין רְאָיָה לַדָּבָר, זֵכֶר לַדָּבָר, שֶׁנֶּאֱמַר (שמות ה, ג) "וַיֹּאמְרוּ אֱלֹהֵי הָעִבְרִים נִקְרָא עָלֵינוּ", וְאוֹמֵר (בראשית יד, יג) "וַיָּבֹא הַפָּלִיט וַיַּגֵּד לְאַבְרָם הָעִבְרִי". רַבִּי אוֹמֵר, יָכוֹל תִּקְרָאֶנּוּ עֶבֶד, לְשׁוֹן בִּזָּיוֹן, תַּלְמוּד לוֹמַר כִּי תִקְנֶה עֶבֶד עִבְרִי, עַל כָּרְחוֹ הַתּוֹרָה קְרָאָתוֹ עֶבֶד. כִּי תִקְנֶה עֶבֶד עִבְרִי, לָמָּה נֶאֱמַר, לְהָבִיא אֶת הַגֵּר דִּבְרֵי רַבִּי אֱלִיעֶזֶר. רַבִּי יִשְׁמָעֵאל אוֹמֵר, אֵינוֹ צָרִיךְ, אִם יִשְׂרָאֵל עוֹבֵד הַגּוֹי הַגֵּר לֹא יַעֲבֹד, אִם יִשְׂרָאֵל עוֹבֵד שֵׁשׁ, הַגֵּר יַעֲבֹד שְׁתֵּים עֶשְׂרֵה, אָמַרְתָּ דַּיּוֹ לַבָּא מִן הַדִּין לִהְיוֹת כַּנִּדּוֹן, מַה יִּשְׂרָאֵל עוֹבֵד שֵׁשׁ, אַף הַגֵּר יַעֲבֹד שֵׁשׁ. לְפִי שֶׁהוּא אוֹמֵר "וְאִם אֵין לוֹ וְנִמְכַּר בִּגְנֵבָתוֹ", שׁוֹמֵעַ אֲנִי לְעוֹלָם, תַּלְמוּד לוֹמַר שֵׁשׁ שָׁנִים יַעֲבֹד, מַגִּיד שֶׁהוּא עוֹבֵד שֵׁשׁ וְיוֹצֵא בַּשְּׁבִיעִית.