After all this, when Josiah had set the temple in order, King Neco of Egypt went up to fight at Carchemish on the Euphrates, and Josiah went out against him.
But Neco sent envoys to him, saying, "What have I to do with you, king of Judah? I am not coming against you today, but against the house with which I am at war; and God has commanded me to hurry. Cease opposing God, who is with me, so that he will not destroy you."
References for 2 Chronicles 35:21
But Josiah would not turn away from him, but disguised himself in order to fight with him. He did not listen to the words of Neco from the mouth of God, but joined battle in the plain of Megiddo.
The archers shot King Josiah; and the king said to his servants, "Take me away, for I am badly wounded."
So his servants took him out of the chariot and carried him in his second chariot and brought him to Jerusalem. There he died, and was buried in the tombs of his ancestors. All Judah and Jerusalem mourned for Josiah.
References for 2 Chronicles 35:24