Negative commandment · Lo Ta’aseh #357 of 613
For a yevamah not to marry anyone other than her yavam
שלא תינשא היבמה לאחר חוץ מיבמה
The verse · Devarim 25:5
כִּי־יֵשְׁבוּ אַחִים יַחְדָּו וּמֵת אַחַד מֵהֶם וּבֵן אֵין־לוֹ לֹא־תִהְיֶה אֵשֶׁת־הַמֵּת הַחוּצָה לְאִישׁ זָר יְבָמָהּ יָבֹא עָלֶיהָ וּלְקָחָהּ לוֹ לְאִשָּׁה וְיִבְּמָהּ
“If brothers dwell together, and one of them die, and have no child, the wife of the dead shall not marry abroad to a stranger: her husband’s brother shall go in to her, and take her to him to wife, and perform the duty of a husband’s brother to her.”
The Rambam’s words
For a yevamah not to marry anyone other than her yavam, as [Deuteronomy 25:5] states: "The wife of the deceased shall not...."
שלא תינשא היבמה לאחר חוץ מיבמה, שנאמר "לא תהיה אשת המת" (דברים כה,ה).
Where in the Mishneh Torah
Hilchot Levirate Marriage and Release הלכות יבום וחליצה