2 Kings 23:30

And his servants carried him in a chariot dead from Megiddo, and brought him to Jerusalem, and buried him in his own sepulchre. And the people of the land took Jehoahaz the son of Josiah, and anointed him, and made him king in his father’s stead.

The verse belongs to the account of Josiah's reign, in the history of Judah after the ten tribes had been swept away, within the account of the kings extending to the Babylonian Captivity. It falls within Josiah's reformation, a bright episode in Judah's history carried out with the support of godly priests and counselors, in which the recovered book of the law led Josiah to make a covenant to obey God and to restore the Passover according to the book. During that reign images and places of idolatrous worship in Judah were destroyed, including worship directed to the sun, moon, constellations, and host of heaven, which heathen teaching identified with departed human souls made divine and with demons never joined to a human body. The chapter also records the fulfillment in Josiah's time of the prophecy concerning Jeroboam.

Josiah was a good king and reformer, identified as Jerusalem's last king who obeyed the Lord's commandments and kept His statutes, so his death was a grievous loss. The verse records Josiah's death and burial in Jerusalem and the people of the land making his son Jehoahaz king in his place. Josiah was killed in battle at Megiddo, in the Jezreel valley, while trying to stop Pharaoh-Necho during the Egyptian invasion, and his servants brought him away dead to Jerusalem.

He was killed by an arrow. His reign ended in 607 B.C., treated as the point after which the Jews no longer kept and could no longer keep the release years and Jubilees, because their people, rulers, and land could not be redeemed. Megiddo is an Old Testament battlefield associated with major victories and disasters, and Josiah's death there is one of its two noted disasters, and this historical association helps connect Megiddo with Revelation's prophetic gathering of the nations for the final conflict.

His death marked a step in Judah's downfall because of the people's sins and was followed by rapid decline and eventual fall to Nebuchadnezzar. His death left Judah under Egyptian power: Necho soon took Jehoahaz prisoner at Riblah and made another son, Eliakim, king, changing his name to Jehoiakim.