John Gill's Exposition of the Whole Bible
Jeremiah 23:2
Therefore thus saith the Lord God of Israel,.... The covenant God of that people, who are Called his sheep, and the sheep of his pasture; having made a covenant with their fathers, and provided a good pasture for them, the land of Israel, where they enjoyed all blessings, civil and religious, and appointed persons over them to feed them; but these did not do their duty, and therefore the Lord was against them, as follows:
against the pastors that feed my people; whose office it was to feed, rule, and defend them; and who pretended to do it, but did it not;
ye have scattered my flock, and driven them away, and have not visited them; they had been the means of their being driven out of their dwellings, and out of their own land, and of their being among the nations of the world, and took no care for the return of them, any more than they concerned themselves for their welfare when over them; or they suffered the enemy, like beasts of prey, to come in among them, which scattered them, and drove them from their pasture, as sheep are by bears, dogs, and wolves; and took no care to preserve them from them, or to gather them together again to their pasture. The people of the Jews, at the time when Christ came, hereafter prophesied of, were scattered as sheep without a shepherd, and are called the lost sheep of the house of Israel, Matthew 9:36;
behold, I will visit upon you the evil of your doings, saith the Lord; that is, punish them for their iniquities; since they visited not the flock in a way of mercy and kindness, as the duty of their office required, the Lord would visit them in a way of justice, and punish them according to their deserts.