Negative commandment · Lo Ta’aseh #166 of 613
That a common priest not become defiled with a dead body except for the relatives elucidated in Scripture
שלא ייטמא כוהן הדיוט לשאר מתים
The verse · Vayikra 21:1
וַיֹּאמֶר ה׳ אֶל־מֹשֶׁה אֱמֹר אֶל־הַכֹּהֲנִים בְּנֵי אַהֲרֹן וְאָמַרְתָּ אֲלֵהֶם לְנֶפֶשׁ לֹא־יִטַּמָּא בְּעַמָּיו
“And the Lord said to Moshe, Speak to the priests the sons of Aharon, and say to them, There shall none be defiled for the dead among his people:”
The Rambam’s words
For a common priest not to become impure through contact with a corpse [with the exception of the specific instances permitted by the Torah], as [Leviticus 21:1] states: "He shall not become impure [through contact with] the dead."
שלא ייטמא כוהן הדיוט לשאר מתים, שנאמר "לנפש לא ייטמא בעמיו" (ויקרא כא,א).
Why · Sefer HaChinuch #263
That a common priest not become defiled with a dead body except for the relatives elucidated in Scripture
“It is from the roots of the commandment [that] since the priests were chosen for the service of G-d, blessed be He — as the verse stated, “they shall be holy to their G-d” (Leviticus 21:6) — therefore, He distanced them from the dead.”
Who & when
“And this commandment is practiced by the male priests in every place and at all times.”
Where in the Mishneh Torah
Hilchot Mourning הלכות אבל