Deuteronomy 17:2

2 If there is any man or woman among you, in any of the towns which the Lord your God gives you, who does evil in the eyes of the Lord your God, sinning against his agreement,

Deuteronomy 17:2 Meaning and Commentary

Deuteronomy 17:2

If there be found among you, within any of thy gates which the
Lord thy God giveth thee
In any of their cities in the land of Canaan:

man or woman that hath wrought wickedness in the sight of the Lord thy
God:
as all that is wrought is in the sight of the omniscient God; here it means not any kind of wickedness, for there is none lives without committing sin of one sort or another, all which is known to God the searcher of hearts, but such wickedness as is after described:

in transgressing his covenant;
that is, his law, and particularly the first table of it, which respects divine worship, and which is in the nature of a marriage contract or covenant; which, as that is transgressed by adultery committed by either party, so the covenant between God and Israel was transgressed by idolatry, which is spiritual adultery, and going a whoring after other gods, as it follows:

Deuteronomy 17:2 In-Context

1 No ox or sheep which has a mark on it or is damaged in any way may be offered to the Lord your God: for that is disgusting to the Lord your God.
2 If there is any man or woman among you, in any of the towns which the Lord your God gives you, who does evil in the eyes of the Lord your God, sinning against his agreement,
3 By becoming a servant of other gods and worshipping them or the sun or the moon or all the stars of heaven, against my orders;
4 If word of this comes to your ears, then let this thing be looked into with care, and if there is no doubt that it is true, and such evil has been done in Israel;
5 Then you are to take the man or woman who has done the evil to the public place of your town, and they are to be stoned with stones till they are dead.
The Bible in Basic English is in the public domain.