The following message came to Jeremiah from the LORD in the tenth year of the reign of Zedekiah, king of Judah. This was also the eighteenth year of the reign of King Nebuchadnezzar.
References for Jeremiah 32:1
Jerusalem was under siege from the Babylonian army, and Jeremiah was imprisoned in the courtyard of the guard in the royal palace.
King Zedekiah had put him there because he continued to give this prophecy: "This is what the LORD says: I am about to hand this city over to the king of Babylon.
King Zedekiah will be captured by the Babylonians and taken to the king of Babylon to be judged and sentenced.
References for Jeremiah 32:4
I will take Zedekiah to Babylon and will deal with him there. If you fight against the Babylonians, you will never succeed."
At that time the LORD sent me a message. He said,
"Your cousin Hanamel son of Shallum will come and say to you, 'Buy my field at Anathoth. By law you have the right to buy it before it is offered to anyone else.'"