1 Esdras 1:23-33

23 The Lord was pleased with everything Josiah did, for he was a very religious man.
24 But the ancient records also tell the story of those who sinned and rebelled against the Lord during Josiah's reign. They sinned more than any other nation or kingdom and did things that offended the Lord so much that his judgment fell on the people of Israel.
25 After Josiah had done all these things, the king of Egypt led an army to fight at Carchemish on the Euphrates River. Josiah tried to stop him,
26 but the king of Egypt sent Josiah this message: "The war I am fighting does not concern you, King of Judah.
27 The Lord God did not send me to fight you; my battle is on the Euphrates River. The Lord is with me, and he is urging me on; so withdraw your troops and don't oppose the Lord."
28 But Josiah did not go back to his chariot and withdraw. He refused to listen to what the Lord had said through the prophet Jeremiah and decided to fight.
29 He went into battle on the plain of Megiddo, and the Egyptian commanders attacked him.
30 King Josiah ordered his servants, "Take me off the battlefield; I'm badly hurt." So they took him out of the line of battle immediately,
31 and he got into a second chariot and was taken back to Jerusalem. There he died and was buried in the royal tomb.
32 All the people of Judah mourned his death. The prophet Jeremiah composed a lament for King Josiah. It has become a custom in Israel for the leaders and their wives to sing this song when they mourn for him.
33 These things are recorded in [The History of the Kings of Judah.] Everything that Josiah did, how he gained his fame and his understanding of the Law, what he did earlier and what is told here, is all recorded in [The History of the Kings of Israel and Judah.]