…you shall not enslave her… (Deuteronomy 21:14)
If a soldier decides not to marry a captive who has gone through the process of the “beautiful woman,” he may not sell her as a slave, as we discussed in the previous mitzvah. Not only that, he may not work her as a slave himself.
The reason for this is the same as in the previous scenario: it’s degrading to her. Even if she’s a prisoner, captured in battle from a heathen nation, she’s a person with basic human rights. She’s not a plaything for him to abuse.
This mitzvah applies at a time when the Jews reside in their land. It is discussed in the Midrash in the Sifre and is codified in the Mishneh Torah in the eighth chapter of Hilchos Melachim. This mitzvah is #264 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos.