Negative commandment · Lo Ta’aseh #263 of 613
Not to sell a yefat to'ar, as a maidservant
שלא למכור אשת יפת תואר
The verse · Devarim 21:14
וְהָיָה אִם־לֹא חָפַצְתָּ בָּהּ וְשִׁלַּחְתָּהּ לְנַפְשָׁהּ וּמָכֹר לֹא־תִמְכְּרֶנָּה בַּכָּסֶף לֹא־תִתְעַמֵּר בָּהּ תַּחַת אֲשֶׁר עִנִּיתָהּ
“And it shall be, if thou have no delight in her, then thou shalt let her go where she will; but thou shalt not sell her at all for money, thou shalt not treat her as a slave, because thou hast humbled her.”
The Rambam’s words
Not to sell a yefat to'ar, as a maidservant as [Deuteronomy 21:14] states: "Do not sell her."
שלא למכור אשת יפת תואר, שנאמר "ומכור לא תמכרנה" (דברים כא, יד).
Why · Sefer HaChinuch #533
To not sell one of beautiful of form
“It is from the roots of the commandment to teach ourselves good and precious traits. And I have already written in many places that a precious soul is fit to receive goods and upon it will blessing always descend, and that the good G-d desired to crown His people with every lovely and refined trait.”
Who & when
“And the content of the one of beautiful form, some of its laws and the place of their elucidation in the Gemara and the time that the law of the one of beautiful form was practiced — all of it is written in its positive commandment in this Order (Sefer HaChinukh 532).”
Where in the Mishneh Torah
Hilchot Kings and Wars הלכות מלכים ומלחמות