Negative commandment · Lo Ta’aseh #312 of 613
Not to reject the authority of the court
שלא להמרות על פי בית דין
The verse · Devarim 17:11
עַל־פִּי הַתּוֹרָה אֲשֶׁר יוֹרוּךָ וְעַל־הַמִּשְׁפָּט אֲשֶׁר־יֹאמְרוּ לְךָ תַּעֲשֶׂה לֹא תָסוּר מִן־הַדָּבָר אֲשֶׁר־יַגִּידוּ לְךָ יָמִין וּשְׂמֹאל
“according to the sentence of the Tora which they shall teach thee, and according to the judgment which they shall tell thee, thou shalt do: thou shalt not deviate from the sentence which they shall tell thee, to the right hand, or to the left.”
The Rambam’s words
Not to reject the authority of the court, as [Deuteronomy 17:11] states: "Do not swerve from the word which they tell you."
שלא להמרות על פי בית דין, שנאמר "לא תסור, מכל הדבר" (ראה דברים יז,יא).
Why · Sefer HaChinuch #496
To not stray from their words
“It is from the root of the commandments [that it is] because (see Ramban on Deuteronomy 17:11) the opinions of people are different from one another — never will many intellects agree on things.”
Who & when
“And this commandment is practiced concerning the matter of the rebellious elder at the time of the [Temple].”
Where in the Mishneh Torah
Hilchot Rebels הלכות ממרים