22 However, Josiah would not go back; but keeping to his purpose of fighting against him, and giving no attention to the words of Neco, which came from God, he went forward to the fight in the valley of Megiddo. 23 And the bowmen sent their arrows at King Josiah, and the king said to his servants, Take me away, for I am badly wounded. 24 So his servants took him out of the line of war-carriages, and put him in his second carriage and took him to Jerusalem, where he came to his end, and they put his body in the resting-place of his fathers. And in all Judah and Jerusalem there was great weeping for Josiah. 25 And Jeremiah made a song of grief for Josiah; and to this day Josiah is named by all the makers of melody, men and women, in their songs of grief; they made it a rule in Israel; and the songs are recorded among the songs of grief. 26 Now the rest of the acts of Josiah, and the good he did, in keeping with what is recorded in the law of the Lord, 27 And all his acts, first and last, are recorded in the book of the kings of Israel and Judah.

Matthew Henry's Commentary on 2 Chronicles 35:22-27

Commentary on 2 Chronicles 35:20-27

(Read 2 Chronicles 35:20-27)

The Scripture does not condemn Josiah's conduct in opposing Pharaoh. Yet Josiah seems to deserve blame for not inquiring of the Lord after he was warned; his death might be a rebuke for his rashness, but it was a judgment on a hypocritical and wicked people. He that lives a life of repentance, faith, and obedience, cannot be affected by the sudden manner in which he is removed. The people lamented him. Many mourn over sufferings, who will not forsake the sins that caused God to send them. Yet this alone can turn away judgments. If we blame Josiah's conduct, we should be watchful, lest we be cut down in a way dishonourable to our profession.