6 At the mouth of two witnesses, or three witnesses, shall he that is to die be put to death: he shall not be put to death at the mouth of one witness. 7 The hands of the witnesses shall be first upon him to put him to death, and afterwards the hands of all the people; and thou shalt put evil away from thy midst.

8 If there arise a matter too hard for thee in judgment, between blood and blood, between cause and cause, and between stroke and stroke, matters of controversy within thy gates, then shalt thou arise, and go up to the place which Jehovah thy God will choose. 9 And thou shalt come unto the priests, the Levites, and unto the judge that shall be in those days, and inquire; and they shall declare unto thee the sentence of judgment; 10 and thou shalt do according to the tenor of the word, which they of that place which Jehovah will choose shall declare unto thee; and thou shalt take heed to do according to all that they instruct thee: 11 according to the sentence of the law which they shall declare unto thee, and according to the judgment which they shall tell thee, thou shalt do: thou shalt not decline from the word which they shall declare unto thee, to the right hand, or the left. 12 And the man that shall act presumptuously, and not hearken unto the priest that standeth to serve there before Jehovah thy God, or unto the judge, that man shall die; and thou shalt put away evil from Israel.

Matthew Henry's Commentary on Deuteronomy 17:6-12

Commentary on Deuteronomy 17:1-7

(Read Deuteronomy 17:1-7)

No creature which had any blemish was to be offered in sacrifice to God. We are thus called to remember the perfect, pure, and spotless sacrifice of Christ, and reminded to serve God with the best of our abilities, time, and possession, or our pretended obedience will be hateful to him. So great a punishment as death, so remarkable a death as stoning, must be inflicted on the Jewish idolater. Let all who in our day set up idols in their hearts, remember how God punished this crime in Israel.

Commentary on Deuteronomy 17:8-13

(Read Deuteronomy 17:8-13)

Courts of judgment were to be set up in every city. Though their judgment had not the Divine authority of an oracle, it was the judgment of wise, prudent, experienced men, and had the advantage of a Divine promise.