Negative commandment · Lo Ta’aseh #168 of 613
For a High Priest not to enter the place where a corpse is found
שלא ייכנס כוהן גדול עם מת
The verse · Vayikra 21:11
וְעַל כׇּל־נַפְשֹׁת מֵת לֹא יָבֹא לְאָבִיו וּלְאִמּוֹ לֹא יִטַּמָּא
“neither shall he go in to any dead body, nor defile himself for his father, or for his mother;”
The Rambam’s words
For a High Priest not to enter the place where a corpse is found, as [Leviticus 21:11] states: "He should not come in contact with any dead body." According to the oral tradition, we have learned that he is obligated [for violating both the prohibitions:] not to become impure and not to enter [the place of a corpse].
שלא ייכנס כוהן גדול עם מת, שנאמר "ועל כל נפשות מת, לא יבוא" (ויקרא כא,יא); כך למדו מפי השמועה, שהוא חייב בבל יבוא וחייב בבל ייטמא.
Who & when
“And this prohibition is practiced at the time of the [Temple], as then was there a high priest there.”
Where in the Mishneh Torah
Hilchot Mourning הלכות אבל