271. Don’t Touch: The prohibition against the Kohein Gadol defiling himself for a corpse
…(even) for his father or his mother he shall not defile himself. (Leviticus 21:11)
Aside from entering a building that contains a corpse, the Kohein Gadol could not cause himself to become ritually impure for a corpse in any other manner, such as by touching it or carrying it. Both of these prohibitions – entering the building and defiling himself by other means – are equally true for other kohanim, but for the Kohein Gadol they were spelled out as two discrete mitzvos.
The reason for this mitzvah is as we said in the previous mitzvah: the Kohein Gadol has such a high level of personal sanctity that he must be willing to overcome even the death of a close relative. It should be noted, however, that a Kohein Gadol is to render himself impure in the case of a meis mitzvah (a corpse that has no one to bury it – see Talmud Nazir 47b).
This mitzvah applies when there is a Temple and a Kohein Gadol. It is discussed in the Talmud in tractate Nazir (42b-44a, 46b-49b) and codified in in the the Mishneh Torah in the seventh chapter of Hilchos Aveil. It is #168 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos.