Jeremiah 42:18

For thus saith the LORD of hosts, the God of Israel; As mine anger and my fury hath been poured forth upon the inhabitants of Jerusalem; so shall my fury be poured forth upon you, when ye shall enter into Egypt: and ye shall be an execration, and an astonishment, and a curse, and a reproach; and ye shall see this place no more.

The book of Jeremiah is not arranged in strict chronological order, for while the chapters up to chapter 20 follow a fairly chronological sequence, chapters 20 to 46 follow a different order running 20, 22, 23, 25, 26, 35, 36, 45, 24, 29, 30, 31, 27, 28, 21, 34, 37, 32, 33, 38, 39:15-18, 39:1-14, 40, 41, 42, 43, 44, 46, so that chapter 42 follows chapters 40 and 41 and 39:1-14 and comes before chapters 43, 44 and 46. It falls within the portion recording events in the two years before Jerusalem fell. It belongs to the account of the remnant of Judah's flight to Egypt, when the Judean leaders, fearing Nebuchadnezzar, took the remnant to Tahpanhes despite Jeremiah's protest against their decision.

The remnant had asked Jeremiah for God's direction and then disobeyed it by entering Egypt, accusing him of speaking under Baruch's influence, and their disobedience brought their destruction. The verse warns that when they enter Egypt, God's anger and fury will be poured out on them just as it was poured out on the inhabitants of Jerusalem. There they will become an execration and an astonishment and a curse and a reproach, an object of horror and cursing. They will never see this place, their homeland, again and will never return to their land.

The warning belongs with their turn to idolatry in Egypt and with the prophecy that their plans would fail and Egypt would be defeated. The story to which the verse belongs is that of people who asked God for guidance without sincere prayer, and it illustrates praying with the lips while the heart is elsewhere.