During a highly tense period in Jerusalem, the prophet attempts to leave the city but is intercepted at the city limits by an officer harboring a deep family grudge. He arrives at the Gate of Benjamin, an exit located either within the territory of the tribe of Benjamin or facing the road that leads to their land [רד״ק, ביאור שטיינזלץ]. Stationed there is a captain appointed specifically to guard the entrance. His primary duty is to prevent the city's residents from escaping and defecting to the enemy camp [מצודת דוד, מצודת ציון, רד״ק].
The guard is identified as Irijah, the son of Shelemiah and grandson of Hananiah. The mention of his exact family line is highly significant. His grandfather is the false prophet Hananiah. According to tradition, before Hananiah died—after being exposed as a fraud by Jeremiah's true prophecy of disaster—he ordered his son Shelemiah to seek revenge against Jeremiah at any given opportunity. Shelemiah eventually passed this vengeful mission down to his son Irijah. Therefore, when Irijah spots Jeremiah at the gate, he seizes the perfect excuse to execute his family's long-standing plot [רש״י, רד״ק, חומת אנך, אברבנאל].
Beyond a mere blood feud, the prophet's capture by Hananiah's grandson represents a divine punishment. In the past, Jeremiah had momentarily flattered the false prophet by saying, "Amen, may God fulfill your words," in response to his fabricated prophecy. This encounter serves as a stark lesson: anyone who flatters a wicked person will ultimately fall into their hands or the hands of their descendants [רש״י, חומת אנך].
Fueled by this deep-seated hatred, the guard acts with sudden violence. He grabs the prophet with intense force, treating him exactly like a fleeing fugitive [מצודת דוד, מצודת ציון, מלבי״ם]. He then hurls a severe accusation, claiming that the prophet is defecting to the Chaldeans. Because the Chaldean army is still present in the land of Judah, the guard frames the departure as a direct act of treason [מלבי״ם, ביאור שטיינזלץ]. He insists this is not a simple journey, but a calculated act of desertion and shifting loyalty to the enemy forces [רד״ק, מצודת ציון]. Ultimately, this fabricated charge provides the city's officials with the perfect pretext to unleash their anger, severely beat the prophet, and throw him into prison [אברבנאל].