According to Hisham Ibn al-Kalbi, Nebuchadnezzar marched on Jerusalem, its king - who was a descendant of David, who had built Jerusalem for the Israelites - made peace with him. Nebuchadnezzar took hostages and departed. When he had gone as far as Thahria, he learned that the Israelites had risen against their king and killed him because he had made peace with him. So, Nebuchadnezzar beheaded all the hostages that were with him. He returned to the Israelites and invaded the city, killing the warriors and capturing their families.
When he had found Jeremiah in prison and released him, Jeremiah told him his story and his warnings concerning him. Nebuchadnezzar said: "What a wicked people, that disobey the prophet of Allah!" He set him free and honored him. Jeremiah gathered around him the remaining weak souls of Israel.
Related Quran Ayaaths of this Hadith.
"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari