Positive commandment · Mitzvat Aseh #233 of 613
To marry a Hebrew maidservant
לייעד אמה עברייה
The verse · Shemot 21:8
אִם־רָעָה בְּעֵינֵי אֲדֹנֶיהָ אֲשֶׁר־[לוֹ] יְעָדָהּ וְהֶפְדָּהּ לְעַם נׇכְרִי לֹא־יִמְשֹׁל לְמׇכְרָהּ בְּבִגְדוֹ־בָהּ
“If she please not her master, who has designated her for himself, then shall he let her be redeemed: to sell her to a strange nation he shall have no power, seeing he has dealt deceitfully with her.”
The Rambam’s words
To marry a Hebrew maidservant, as [Exodus 21:8] states: "Who has designated her for himself... and she will be redeemed."
לייעד אמה עברייה, שנאמר: "אשר לו יעדה" (שמות כא,ח), "ואם לבנו, ייעדנה" (שמות כא,ט).
Why · Sefer HaChinuch #43
Designation of a Hebrew bondwoman
“It is from the roots of this commandment that G-d had mercy on the poor one that is sold and upon her father who needed to sell her. And [so] He commanded the one who acquires her to marry her as a wife and to make her a patroness — as He is a graceful and merciful G-d.”
Who & when
“And [it] is only practiced at the time that the Jubilee is practiced (Gittin 65a).”
Where in the Mishneh Torah
Hilchot Slaves הלכות עבדים