John Gill's Exposition of the Whole Bible
Jeremiah 40:1
The word which came to Jeremiah from the Lord,.... The word of prophecy, as the Targum; but there being no prophecy in this and the following chapter, only a narration of facts, this is generally referred to what came ten days after, and which begins Jeremiah 42:7; so Jarchi and Kimchi; all between being included in a parenthesis, or a relation of facts preparatory, to lead on to it; though Abarbinel takes it to be a general title to all histories and prophecies in this book, from henceforward to the end of it. Jarchi and Kimchi make mention of a Midrash, which refers it to the special word of the Lord to Jeremiah to go to Gedaliah, Jeremiah 40:5; interpreting that passage as the words of the Lord, and not of Nebuzaradan; but Abarbinel's sense seems best. The time of this prophecy was
after that Nebuzaradan the captain of the guard had let him go from Ramah; which was a city in the land of Benjamin near Gibeon, seven miles from Jerusalem, as Jerom q says; here Nebuzaradan had his rendezvous, whither he brought his captives as they fell into his hands, among whom were Jeremiah:
when he had taken him; out of the court of the prison, and out of Jerusalem, and brought him to Ramah:
being bound in chains among all them that were carried away captive of Jerusalem and Judah, that were carried away captive unto Babylon; how it came to pass is not certain, but so it was; that, though by the orders of Nebuzaradan and the princes, agreeably to the command of the king of Babylon, Jeremiah was taken out of the court of the prison, yet was not set free; but without the knowledge of Nebuzaradan, and through the inadvertency of inferior officers, he was taken and bound, and with other prisoners brought to Ramah, in order to be transported to Babylon, which lay in the way to it; for Ramah was to the north of Jerusalem, as Babylon was: these chains were for the hands, or what we call handcuffs, as Kimchi, Abarbinel, and Ben Melech observe, and as appears from Jeremiah 40:4.
q Comment in Hos. v. 8,