At the beginning of Jehoiakim's reign, God tells Jeremiah to stand in the court of the temple and speak to all the people and cities of Judah. They're getting another chance to repent. Maybe they'll actually listen this time.
If the people don't finally come to their senses, God's going to do the same thing to Jerusalem that he did to Shiloh up north: it'll be devastated.
But the priests and prophets don't want to hear it, and they threaten to kill Jeremiah.
The king's officials come to the temple, and the priests and prophets tell them about what Jeremiah had just prophesied. They think he should die for it.
Jeremiah says that he's only saying what God has made him say. If they want to kill him they can go right ahead, but innocent blood will be on their hands.
The officials and the people agree that Jeremiah shouldn't be put to death. Some of the elders point out that Micah prophesied about Jerusalem's destruction during Hezekiah's reign and Hezekiah didn't kill him.
And besides, God changed his mind and actually didn't destroy Jerusalem that time. Maybe that'll happen again.
But there's another prophet named Uriah son of Shemaiah who isn't as lucky as Jeremiah. He prophesies against Judah and Jerusalem in the same way and is threatened with death by Jehoiakim.
Uriah tries to escape to Egypt but is captured. Jehoiakim personally kills him with his own sword.
But Ahikam son of Shaphan protects Jeremiah so that no one can kill him.