Josiah attempts to save the Isrealites from god's predicted punishment of enslavement by the Babylonians. He fails.
Josiah gathers up all the elders and priests and important people and reads to them from Deuteronomy. They all promise to do what the book says. He has the temples and shrines to Baal torn down, then has the whole thing burned near a creek and then throws the ashes on the graves of the children of the worshippers. Then he destroys the houses of homosexuals. Wouldn't you love to live in a theocracy?
He rounds up the priests and defrocks them, only allowing them to eat unleavened bread together in a sort of priestly rubber room. Finally, someone destroys the place of child sacrifice. He removes horses and chariots from the temple that had been consecrated to the sun. He has the altars that Manasseh built beaten into sheet metal and destroyed. Then he turns all the Baal sites into graveyards.
The defrocked priests are now killed. He reinstitutes Passover, which had not been celebrated since Judges. Then he removes all the familiar animals, the wizards and their idols. It isn't enough for god, who still plans to send the Israelites to Babylon.
The Egyptians now invade, and Josiah is killed, thus negating the promise god made that he would die a peaceful death. His son Jehoahaz takes over, and goes right back to being bad, which, given that god didn't even keep his one promise to his father, I don't blame him for. The Egyptian pharaoh arrests him and taxes the Israelites heavily. He installs a puppet king and takes Jehoahaz back to Egypt, where he dies. The puppet pays the tribute and reigns for 11 idolatrous years.