Jeremiah 37:11

And it came to pass, that when the army of the Chaldeans was broken up from Jerusalem for fear of Pharaoh’s army,

The Chaldeans had laid siege to Jerusalem, but their army broke off the siege and withdrew from the city for a time. The cause of that withdrawal was fear of Pharaoh's army, which was then approaching. That temporary lifting of the pressure created the opening in which Jeremiah attempted to go out from Jerusalem.