Any sin offering whose blood has been brought to the Tent of Meeting …shall not be eaten… (Leviticus 6:23)
Some sin offerings had their blood sprinkled on the altar inside the Mishkan or the Temple. Those were to be burned in their entirety and not eaten. Those sacrifices whose blood was sprinkled outside were to be eaten and only the innards would be burned.
The Talmud in Zevachim (81b) says that if the blood of a sacrifice that should be eaten is brought inside, it becomes disqualified. After all, our verse says, “Any sin offering whose blood is brought inside…shall not be eaten!” (And if the blood of a sin offering that was meant to be burned was brought too far inside, into the Holy of Holies, it would likewise be disqualified.)
This is one of the details of sacrifices that the Sefer HaChinuch said we cannot hope to fathom. (See the previous mitzvah.) In the big picture, sacrifices are to stir our emotion and draw us closer to God. As to why those whose blood is sprinkled outside are to be eaten but those whose blood is sprinkled inside are not – who knows?
This mitzvah is clearly intended for male kohanim, who otherwise might eat a korban chatas. In practical terms, however, no one is permitted to eat a chatas whose blood is sprinkled inside, so the prohibition really applies to everyone. The Talmud discusses this mitzvah in tractate Zevachim, on page 81b-83a, and in Pesachim, 23b-24a. It is codified in the Mishneh Torah in the eleventh chapter of Hilchos Maaseh HaKarbanos. It is #139 of the 365 negative mitzvos in the Rambam’s Sefer HaMitzvos.