2 and the king goeth up to the house of Jehovah, and every man of Judah, and all the inhabitants of Jerusalem, with him, and the priests, and the prophets, and all the people, from small unto great, and he readeth in their ears all the words of the book of the covenant that is found in the house of Jehovah. 3 And the king standeth by the pillar, and maketh the covenant before Jehovah, to walk after Jehovah, and to keep His commands, and His testimonies, and His statutes, with all the heart, and with all the soul, to establish the words of this covenant that are written on this book, and all the people stand in the covenant.

Matthew Henry's Commentary on 2 Kings 23:2-3

Commentary on 2 Kings 23:1-3

(Read 2 Kings 23:1-3)

Josiah had received a message from God, that there was no preventing the ruin of Jerusalem, but that he should only deliver his own soul; yet he does his duty, and leaves the event to God. He engaged the people in the most solemn manner to abolish idolatry, and to serve God in righteousness and true holiness. Though most were formal or hypocritical herein, yet much outward wickedness would be prevented, and they were accountable to God for their own conduct.