The text literally says, “Israel did the evil in the eyes of the Lord.” The use of the definite article indicates that it is a particular kind of evil. The expression is used in the book of Deuteronomy, and every time it refers not to general evil—whether that is immorality, murder, or abuse of others—but always to the abandoning of the Lord and the replacement of the worship of God with other gods. This expression has already appeared, in Judges 2:11, Judges 3:7, Judges 3:12, and Judges 4:1.
1 The people of Israel did what was evil in the sight of the LORD, and the LORD gave them into the hand of Midian seven years.