Negative commandment · Lo Ta’aseh #129 of 613
For a person who became ritually impure not to partake of consecrated foods
שלא יאכל אדם שנטמא קודשים
The verse · Vayikra 7:20
וְהַנֶּפֶשׁ אֲשֶׁר־תֹּאכַל בָּשָׂר מִזֶּבַח הַשְּׁלָמִים אֲשֶׁר לַה׳ וְטֻמְאָתוֹ עָלָיו וְנִכְרְתָה הַנֶּפֶשׁ הַהִוא מֵעַמֶּיהָ
“But the person that eats of the flesh of the sacrifice of peace offerings, that pertain to the Lord, having his uncleanness upon him, that soul shall be cut off from his people.”
The Rambam’s words
For a person who became ritually impure not to partake of consecrated foods, as [Leviticus 7:20] states: "And a soul who partakes of the meat of the peace sacrifice while he is impure...."
שלא יאכל אדם שנטמא קודשים, שנאמר "והנפש אשר תאכל בשר, מזבח השלמים אשר לה', וטומאתו, עליו" (ויקרא ז,כ).
Why · Sefer HaChinuch #167
That one impure not eat consecrated foods
“From the roots of the commandment are what you will see at the end of my words. However, I am afraid of drawing close to the Dwelling of G-d, as I know that “anyone who comes close, who comes close” that has not sufficiently sanctified himself “will not see the House and live.””
Who & when
“And [it] is practiced at the time of the [Temple] by males and females.”
Where in the Mishneh Torah
Hilchot Sacrifices Rendered Unfit הלכות פסולי המוקדשין