Perakim 21-22 are comprised of a unit of prophecies rebuking the kings of Yehuda for their sinful behavior. These prophecies, which are not organized in chronological order, were received at different points in Yirmiyahu's life and relate to a number of different kings. Tzidkiyahu, the last king to rule Yehuda before the destruction of the Temple, sends a group of messengers to Yirmiyahu in order to receive words of comfort. The prophecy in perek 21 is a response to the arrival of that group. Yirmiyahu sends the messangers back to Tzidkiyahu, who had refused to believe in Yirmiyahu's prophecies until that point, with a prophecy depicting Yerushalayim's destruction. The perek continues with a rebuke of Tzidkiyahu's corrupt justice system which is partly responsible for the destruction of the kingdom.
The unit of prophecies discussing the kings of Yehuda continues into this perek as well. Four kings reigned in Yehuda after Yoshiyahu. Yehoachaz, the son of Yoshiyahu, who in this prophecy is named "Shalum", rules Yehuda for three months before being exiled by Pharaoh Necho. Yehoyakim, the son of Yoshiyahu, rules for eleven years. His son, Yehoyachin, rules for three months and is then exiled with his mother by the Babylonian king. Tzidkiyahu, the son of Yoshiyahu, serves as the final king of Yehuda. The perek begins with general words of rebuke addressed to the king of Yehuda (1-9). This is followed by a prophecy of destruction about "Shulam" (Yehoachaz) (1-12), Yehoyakim (13-19), and Yehoyachin (24-30). In these prophecies, Yirmiyahu paints a picture of the ideal kingship, which stands in stark contrast to the immoral nature of the kings mentioned.