Mishneh Torah — Negative Mitzvot מצוות לא תעשה, Chapter 162
The full Hebrew text of Mishneh Torah, Negative Mitzvot, Chapter 162, with English translation by Maimonides (Rambam).
שלא יבעול כוהן גדול אלמנה, ואפילו בלא קידושים, מפני שמחללה, שנאמר "לא יחלל זרעו, בעמיו" (ויקרא כא,טו); הרי הוא מוזהר שלא לחלל כשרה.
For a High Priest not to have sexual relations with a widow even outside the context of marriage, because by doing so he profanes her, as [Leviticus 21:15] states: "He shall not profane his progeny...." This [also] implies that he must not cause a woman eligible to marry a priest to become ineligible [as happens through the relations described above].