Positive commandment · Mitzvat Aseh #23 of 613
For the Levites to serve in the sanctuary
לִהְיוֹת הַלֵּוִי עוֹבֵד בַּמִּקְדָּשׁ
The verse · Bamidbar 18:23
וְעָבַד הַלֵּוִי הוּא אֶת־עֲבֹדַת אֹהֶל מוֹעֵד וְהֵם יִשְׂאוּ עֲוֺנָם חֻקַּת עוֹלָם לְדֹרֹתֵיכֶם וּבְתוֹךְ בְּנֵי יִשְׂרָאֵל לֹא יִנְחֲלוּ נַחֲלָה
“But the Levites shall do the service of the Tent of Meeting, and they shall bear their iniquity: it shall be a statute for ever throughout your generations, that among the children of Yisra᾽el they have no inheritance.”
The Rambam’s words
For the Levites to serve in the sanctuary, as [Numbers 18:23] states: "And the Levite shall serve...."
לִהְיוֹת הַלֵּוִי עוֹבֵד בַּמִּקְדָּשׁ, שֶׁנֶּאֱמָר: "וְעָבַד הַלֵּוִי הוּא" (במדבר יח, כג).
Why · Sefer HaChinuch #394
Service of the Levites in the Temple
“It is from the roots of the roots of the commandment [that it is] because it is the glory of the King and the place that there be specific people from a specific tribe, that are affixed to His service, and that foreigners not come to serve.”
Who & when
“And [it] is practiced at the time of the [Temple] by the Levites.”
Where in the Mishneh Torah
Hilchot Vessels of the Sanctuary and Those Who Serve Therein הלכות כלי המקדש והעובדין בו