Positive commandment · Mitzvat Aseh #232 of 613
To carry out the laws concerning a Hebrew servant
לדון בעבד עברי כהלכותיו
The verse · Shemot 21:2
כִּי תִקְנֶה עֶבֶד עִבְרִי שֵׁשׁ שָׁנִים יַעֲבֹד וּבַשְּׁבִעִת יֵצֵא לַחׇפְשִׁי חִנָּם
“If thou buy a Hebrew servant, six years he shall serve: and in the seventh he shall go out free, for nothing.”
The Rambam’s words
To carry out the laws concerning a Hebrew servant, as [Exodus 21:2] states: "When you purchase a Hebrew servant...."
לדון בעבד עברי כהלכותיו, שנאמר: "כי תקנה עבד עברי" (שמות כא,ב).
Why · Sefer HaChinuch #42
Law of a Hebrew slave
“It is from the roots of this commandment that G-d wanted His people Israel that He chose, to be a holy nation, full of — and crowned with — good and lofty traits; as blessing rests upon them from this.”
Who & when
“And the commandment is practiced by males, but not by females — as a woman does not acquire a Hebrew slave (Bava Metzia 71a).”
Where in the Mishneh Torah
Hilchot Slaves הלכות עבדים