Positive commandment · Mitzvat Aseh #229 of 613
For a court to execute by stoning [the condemned] with stones
להיות בית דין סוקלין באבנים
The verse · Devarim 22:24
וְהוֹצֵאתֶם אֶת־שְׁנֵיהֶם אֶל־שַׁעַר הָעִיר הַהִוא וּסְקַלְתֶּם אֹתָם בָּאֲבָנִים וָמֵתוּ אֶת־הַנַּעֲרָ עַל־דְּבַר אֲשֶׁר לֹא־צָעֲקָה בָעִיר וְאֶת־הָאִישׁ עַל־דְּבַר אֲשֶׁר־עִנָּה אֶת־אֵשֶׁת רֵעֵהוּ וּבִעַרְתָּ הָרָע מִקִּרְבֶּךָ
“then you shall bring them both out to the gate of that city, and you shall stone them with stones that they die; the girl, because she cried not, being in the city; and the man, because he has humbled his neighbour’s wife: so thou shalt put away evil from among you.”
The Rambam’s words
For a court to execute by stoning [the condemned] with stones, as [Deuteronomy 22:24] states: "And you shall stone them."
להיות בית דין סוקלין באבנים, שנאמר: "וסקלתם אותם" (דברים כב,כד).
Why · Sefer HaChinuch #555
The commandment upon the court to stone the one liable
“The root of this commandment is revealed to all, as “by justice a king sustains the land.” As were it not for the fear of judgment, people would kill one another.”
Who & when
“And it is practiced at the time of the Temple.”
Where in the Mishneh Torah
Hilchot The Sanhedrin and the Penalties within Their Jurisdiction הלכות סנהדרין והעונשין המסורין להם