The twenty-second chapter of Second Kings tells it as an administrative incident that turns into a crisis. Josiah sends his secretary Shaphan to the temple to account for the money collected for repairs; Hilkiah the high priest mentions that he has found a book of the law in the house of the Lord; Shaphan reads it, takes it to the king, and reads it to him. The king tears his clothes, because what he has heard tells him that the wrath of the Lord is kindled against Judah for what its fathers did not do. He sends a delegation to Huldah, a prophetess living in Jerusalem, who confirms the judgment but tells him he will not live to see it.
Since Wilhelm de Wette argued the case in 1805, the scroll has been widely identified with an early form of the book of Deuteronomy, on the grounds that the measures Josiah then takes match Deuteronomy's programme point by point: one sanctuary, no local high places, no cult of the sun, moon and host of heaven, no passing of children through fire, and a Passover kept centrally. That identification is the foundation stone of modern pentateuchal criticism and of the argument that a Deuteronomistic school shaped the historical books from Joshua to Kings.
What is disputed is what actually happened in the temple. Some scholars read the discovery straightforwardly, as the recovery of an old text neglected under Josiah's predecessors Manasseh and Amon. Others read it as the presentation of a newly composed or heavily edited law given the authority of a find, a device with parallels elsewhere in the ancient world. Others again treat the whole scene as a later literary construction explaining the reform's theology. The dispute is about the mechanism, not about whether the reform mattered.