God tells Jeremiah not to pray or intercede for the people because he will not listen when they call in their trouble (Jeremiah 7:16). A similar prohibition appears as judgment is declared for breaking the covenant (Jeremiah 11:14).
In Jeremiah 7:16–20 Jeremiah is told not to pray for the people, because God will not listen. The reason is visible in public life: across Judah and Jerusalem families cooperate in making offerings to the “queen of the sky” and other gods. God asks whether these actions really harm him, then answers that the people are mainly bringing shame on themselves. These verses come from Jeremiah’s temple-area preaching in chapter 7, where he confronts a disconnect between religious routines and daily behavior.
Jeremiah 7:16–20 presents a moment when God tells Jeremiah to stop praying for “this people” because God will not listen (an explicit textual claim). The passage grounds that refusal in visible, widespread idolatry practiced openly in Judah and Jerusalem and carried out at the household level (explicit).
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with Jeremiah 7:16, then read the surrounding section so the answer stays connected to the passage's flow.
16Therefore don`t you pray for this people, neither lift up a cry nor prayer for them, neither make intercession to me; for I will not hear you.