Josiah had put the temple in order. After all of that, Neco went up to fight at Carchemish. He was king of Egypt. Carchemish was on the Euphrates River. Josiah marched out to meet Neco in battle.
But Neco sent messengers to him. They said, "King Josiah, there isn't any trouble between you and me. I'm not attacking you at this time. I'm at war with another country. God told me to hurry. He's with me. So stop opposing him. If you don't, he'll destroy you."
But Josiah wouldn't turn away from Neco. He wore different clothes so people wouldn't recognize him. He wanted to go to war against Neco. He wouldn't listen to what God had commanded Neco to say. Instead, he went out to fight him on the flatlands of Megiddo.
Men who had bows shot arrows at King Josiah. After he was hit, he told his officers, "Take me away. I'm badly wounded."
So they took him out of his chariot. They put him in his other chariot. They brought him to Jerusalem. There he died. His body was buried in the tombs of his family. All of the people of Judah and Jerusalem sobbed over him.
Jeremiah wrote songs of sadness about Josiah. To this very day all of the male and female singers remember Josiah by singing those songs. That became a practice in Israel. The songs are written down in the Book of the Songs of Sadness.
Josiah did many things that showed he was faithful to the Lord. Those things and the other events of Josiah's rule were in keeping with what is written in the Law of the Lord.
All of the events from beginning to end are written down. They are written in the records of the kings of Israel and Judah.