Judean king Josiah
16 “Thus says Hashem, ‘Behold, I will bring evil on this place, and on its inhabitants, even all the words of the book which the king of Judah has read. 17 Because they have forsaken me, and have burned incense to other gods, that they might provoke me to anger with all the work of their hands, therefore my wrath shall be kindled against this place, and it shall not be quenched.’” 2 Kings 22:16-17
The Bible portrays Judean king Josiah as a pious reformer. In the Hebrew Bible's account of Israel, there are great vicissitudes in Israelite loyalty to God: David's piety and justice; Solomon's royal excess and religious neglect; Hezekiah's oppression of paganism; Manasseh's pagan indulgences; and Judean king Josiah's (639 - 609 BC) renewal of Israelites' adherence to God.
The Hebrew Bible frames the Northern Kingdom's collapse as inevitable after its rejection of the Davidic dynasty. Similarly, as 2 Kings 22:16-17 reveals, the Southern Kingdom's grievances had grown too great. Even Josiah's pious reforms could not redeem Judah and avoid the Babylonian takeover which followed his death at Megiddo.
In response to a prophesy of Judah's doom, Josiah instituted radical religious reforms, striking down any Canaanite cultic edifices he could reach and even eschewing Canaanite burial practices. This was arguably deeper than Judean king Hezekiah's reforms. Amidst the post-Assyrian power vacuum, Josiah also tried to expand Judean territory. However, Manasseh's sins were so grievous that even Josiah's religious reforms could not undo the punishment that was fated for Judah.
The Babylonians captured Jerusalem when Josiah rebelled against them. Josiah himself was killed when meeting with Pharao Neco at Megiddo.
Josiah's Book of the Law, Deuteronomy and Assyrian Treaties
The high priest Hilkiah said to Shaphan the secretary, "I have found the book of the law in the house of the Lord." ... 11 When the king heard the words of the book of the law, he tore his clothes. ... Then the king commanded... Go, inquire of the Lord for me, for the people, and for all of Judah, concerning the words of this book that has been found; for great is the wrath of the Lord that is kindled against us, because our ancestors did not obey the words of this book 2 Kings 22:8,11,12,13
The Hebrew Bible's account of the book of the law (thought to be Deuteronomy) being found in the temple and brought out like a long-lost roadmap may be taken literally or liberally. Perhaps the author of 2 Kings 22 merely wanted to stress the antique pre-existence and God-given nature of the laws, and that they had been neglected, and thus prefaced Josiah's reforms with this story. Perhaps the Mosaic laws were symbolically lost, as though Manasseh had just disregarded them, left them on the shelf, awaiting for Josiah to renew allegiance to them.
Other kings at the time were resurrecting archaic texts: the Egyptian pharaohs opening millennia-old tombs and using texts there to enact religious reforms, and Assurbanipal was copying old texts to create a library. In the midst of all this reverence for archaic documents is a good context for Josiah's alleged discovery and resurrection of Deuteronomical documents.
However, Deuteronomy has a structure that is strikingly similar to Assyrian treaties, especially in Deuteronomy 6:5. When Josiah took the throne, Assyria likely required him to sign a vassal treaty confirming Judah's subservience to Assyria. Yet then Josiah finds a book that leads him to embark on reforms and toss off the yoke of Assyria. Perhaps Deuteronomy was written under Josiah specifically because he needed divine affirmation for his rebellion against Assyria and also a sacred backing for his aggressive renewal of Adonai-worship.
What better way to renew a treaty with God, to bind the people to the covenant, to advocate a radical loyalty to God rather than foreign gods and powers, than to adapt an Assyrian treaty? The description of Josiah's discovery of the book may then be considered political propaganda -- he claimed as king that his book had divine authority, that it had been in the temple, and that he simply discovered it.
15 Moreover the altar that was at Bethel, and the high place which Jeroboam the son of Nebat, who made Israel to sin, had made, even that altar and the high place he broke down; and he burned the high place and beat it to dust, and burned the Asherah. 16 As Josiah turned himself, he spied the tombs that were there in the mountain; and he sent, and took the bones out of the tombs, and burned them on the altar, and defiled it, according to the word of Adonai which the man of God proclaimed, who proclaimed these things. 24 Moreover Josiah removed those who had familiar spirits, and the wizards, and the teraphim, and the idols, and all the abominations that were seen in the land of Judah and in Jerusalem, that he might confirm the words of the law which were written in the book that Hilkiah the priest found in the house of Adonai. 25 Like him was there no king before him, who turned to Adonai with all his heart, and with all his soul, and with all his might, according to all the law of Moses; neither after him arose there any like him. 2 Kings 23:15-16, 24-25