Deuteronomy 17:14–20 ranks among the most influential biblical passages in history, though many people may not know it. It is one of the foundations for the traditional concept in Western jurisprudence and constitutional theory known as lex rex, the idea that the law is king—that rulers are subject to the laws of a nation no less than ordinary citizens. Long ago, God revealed through Moses that kings had no license to break the law but were subject to its dictates and responsible to know and enforce it.
In ancient Judah, good kings such as Hezekiah and Josiah (2 Kings 18:1–8; 22) kept the law of Moses and led the country's citizens in obedience to its statutes. Bad kings broke God's law, and prophets such as Jeremiah were tasked with calling such rulers to repentance along with the ordinary citizens. Jeremiah 22 contains oracles against several kings of ancient Judah and begins with general principles for every ruler (vv. 1–10). Verse 3 calls the king to "do justice and righteousness" by protecting foreigners residing in the country, victims of crime, widows, and orphans. Kings were also not to shed innocent blood, and this probably refers to a prohibition of child sacrifice or a command to maintain law and order so that people were not committing violence in the street. All of these rules are found in the Mosaic law (Ex. 22:21–22; Lev. 18:21; 19:33; Deut. 27:19), and the king was not doing his job when he failed to obey these statutes.
For a king and his household to remain on the throne of Judah, obedience to these laws was required (Jer. 22:4). Impenitent disobedience, on the other hand, would remove a king and his dynasty (v. 5). Of course, God's solemn covenant with David guaranteed that his offspring would reign over the children of the Lord (2 Sam. 7), but that does not mean every offspring was promised the throne in Jerusalem. Flagrant covenant violation via persistent idolatry would lead to the fall of Jerusalem, and were this to happen, even the pagans would know why the city was destroyed (Jer. 22:8–10).
During Jeremiah's lifetime, all of Judah's kings with the exception of Josiah failed to live up to this ideal. Jehoiakim, for example, dwelled in Lebanon (v. 23). That is, he was content to live in a palace made from the choice cedar of Lebanon—he lavished resources on himself without paying attention to the true needs of the people. The wicked kings after Josiah proved that a new son of David was needed in Judah.
Jesus is the true Son of David who keeps the law of God perfectly and thereby has earned the right to rule and reign over His people forever. Unlike many of the kings and authorities of this world, Jesus never ignores the needs of His people in order to satisfy Himself. Instead, He did not consider equality with God something to be used at the expense of others but rather humbled Himself to serve His people. This self-sacrifice is the model for all godly leaders.