Negative commandment · Lo Ta’aseh #73 of 613
For a person who is intoxicated not to enter the Temple nor to render a halachic decision
שלא יכנס למקדש ולא יורה בתורה שתוי יין
The verse · Vayikra 10:9
יַיִן וְשֵׁכָר אַל־תֵּשְׁתְּ אַתָּה וּבָנֶיךָ אִתָּךְ בְּבֹאֲכֶם אֶל־אֹהֶל מוֹעֵד וְלֹא תָמֻתוּ חֻקַּת עוֹלָם לְדֹרֹתֵיכֶם
“Do not drink wine or strong drink, thou, nor thy sons with thee, when you enter the Tent of Meeting, lest you die: it shall be a statute for ever throughout your generations:”
The Rambam’s words
For a person who is intoxicated not to enter the Temple nor to render a halachic decision, as [Leviticus 10:9] states: "Do not drink wine or strong drink when you enter the Tent of Testimony," and [ibid., 10:11] states: "or when you render a decision for the children of Israel."
שלא יכנס למקדש ולא יורה בתורה שתוי יין, שנאמר "יַיִן וְשֵׁכָר אַל תֵּשְׁתְּ בְּבוֹאֲכֶם אֶל אֹהֶל מוֹעֵד" (ויקרא י, ט) ונאמר "וּלְהוֹרוֹת אֶת בְּנֵי יִשְׂרָאֵל" (ויקרא י, יא).
Why · Sefer HaChinuch #152
To not enter the Temple intoxicated, and likewise to not give a ruling intoxicated
“The root of the commandment is well-known — that it is only fitting to be involved in extremely precious things, like matters of the Temple and words of Torah, at the time that a man is settled in his thoughts and focused in all of his actions.”
Who & when
“And the prohibition of coming to the Temple in drunkenness is practiced at the time of the [Temple] by males and females.”
Where in the Mishneh Torah
Hilchot Admission into the Sanctuary הלכות ביאת מקדש