Josiah died at Megiddo in 609 B.C. when he interrupted Pharaoh Neco's military advance against the Babylonians.
"Fearing the advance of the Babylonians, Pharaoh Neco and the Egyptian army were on their way to assist the Assyrians. Josiah, who apparently was an ally of the Babylonians (or at least an opponent of the Assyrians), attempted to impede the march of Neco."98
Quite clearly Pharoah's word to him to turn back was from the Lord (v. 22). Probably the writer included this event in his narrative because Josiah came closer to the Davidic ideal than any other king since Solomon. Yet he too was disobedient to God. Thus David's greatest Son was yet to come. When He comes back to the earth He will win the battle that will be raging at the very place Josiah died, the Plain of Megiddo (i.e., Armageddon, lit. the mountain of Megiddo).99
"He [Josiah] was a shepherd whose flock never really accepted or understood him, though his concern was for its own welfare . . ."100
Josiah's death is another example of immediate retribution for sin, of which we have seen many in Chronicles. He is one more king who began well but ended up doing something wrong (cf. Asa, Jehoshaphat, Joash, Amaziah, Uzziah). He was not the only king to hear a warning before his tragic military error (cf. 11:1-4; 18:16-22). Like the other reforming kings (Asa, Jehoshaphat, and Hezekiah), he sensed a military threat by an external enemy following his religious reforms.101