Negative commandment · Lo Ta’aseh #163 of 613
That the priests not enter the Temple with grown hair
שלא ייכנס כוהן למקדש פרוע ראש
The verse · Vayikra 10:6
וַיֹּאמֶר מֹשֶׁה אֶל־אַהֲרֹן וּלְאֶלְעָזָר וּלְאִיתָמָר בָּנָיו רָאשֵׁיכֶם אַל־תִּפְרָעוּ וּבִגְדֵיכֶם לֹא־תִפְרֹמוּ וְלֹא תָמֻתוּ וְעַל כׇּל־הָעֵדָה יִקְצֹף וַאֲחֵיכֶם כׇּל־בֵּית יִשְׂרָאֵל יִבְכּוּ אֶת־הַשְּׂרֵפָה אֲשֶׁר שָׂרַף ה׳
“And Moshe said to Aharon, and to El῾azar and to Itamar, his sons, Let the hair of your heads not grow long, neither rend your clothes; lest you die, and lest anger come upon all the people: but let your brethren, the whole house of Yisra᾽el bewail the burning which the Lord has kindled.”
The Rambam’s words
For a priest not to enter the Temple with hair that has grown unseemingly long, as [implied by Leviticus 10:6]: "Do not let your hair grow long."
שלא ייכנס כוהן למקדש פרוע ראש, שנאמר "ראשיכם אל תפרעו" (ויקרא י,ו).
Who & when
“And [it] is practiced at the time of the [Temple] by the males of the priesthood.”
Where in the Mishneh Torah
Hilchot Admission into the Sanctuary הלכות ביאת מקדש