Mishneh Torah — Negative Mitzvot מצוות לא תעשה, Chapter 166
The full Hebrew text of Mishneh Torah, Negative Mitzvot, Chapter 166, with English translation by Maimonides (Rambam).
שלא ייטמא כוהן הדיוט לשאר מתים, שנאמר "לנפש לא ייטמא בעמיו" (ויקרא כא,א).
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."