Previously, God told Jeremiah to make a number of wooden yokes for himself and for various neighboring kings (Jeremiah 27:1-11), which symbolized servitude to Nebuchadnezzar. Through this, God was instructing to submit to Babylonian rule. Even though doing so would be humbling for Judah, it would be better for them than to resist Nebuchadnezzar, and thus God's will.
But not everyone in Judah was ready to accept this reality. Even though God specifically warned against false prophets who spoke against submitting to Nebuchadnezzar (Jeremiah 27:9-10), this is exactly what happened in the case of an obscure prophet named Hananiah.
Jeremiah had previously prophesied that Judah would be in exile in Babylon for a full seventy years (Jeremiah 25:11-12). He also foretold that Jeconiah (Coniah) would die in a foreign land (Jeremiah 22:24-26) and that the vessels of the Temple would remain there until the day that God brought them back (Jeremiah 27:19-22). Now, though, Hananiah came with a message that directly contradicted Jeremiah's prophecies. In Hananiah's vision of the future, Judah's restoration was just around the corner; everything would be back to normal within two years.
David C. Grabbe
Other Forerunner Commentary entries containing Jeremiah 28:1: