Jeremiah had been commanded by the Lord to speak to the king, "Act with justice and righteousness, and deliver from the hand of the oppressor anyone who has been robbed. And do no wrong or violence to the alien, the orphan, and the widow; or shed innocent blood in this place" (Jeremiah 22:1-5). King after king has failed rule as they should have. Rather than care for the welfare of the people, they have built up their own wealth.
The Lord is ready to take action against these injustices, "Woe to the shepherds who destroy and scatter the sheep of my pasture. So I will attend to you for your evil doings."
Persons of wealth, persons in positions of authority had forgotten what the Lord had expected of them, had forgotten that the wealth and authority was not solely for their own benefit but was intended to be used to care for the poor, the powerless, the stranger.
In the time of Jeremiah, Babylon invaded Judah, destroying Jerusalem and taking many into exile. But, destruction and exile, though deserved, are not to be the end. The Lord promises to regather them and to install new shepherds for them.