In the third year of the reign of Jehoiakim king of Judah, Nebuchadnezzar king of Babylon came to Jerusalem and besieged it. And the Lord gave Jehoiakim king of Judah into his hand, with some of the articles of the house of God, which he carried into the land of Shinar to the house of his god; and he brought the articles into the treasure house of his god. (Dan 1:1-2 NKJ)
Now there was also a man who prophesied in the name of the Lord, Urijah, the son of Shemaiah of Kirjath Jearim, who prophesied against this city and against this land according to all the words of Jeremiah. And when Jehoiakim the king, with all his mighty men and all the princes, heard his words, the king sought to put him to death; but when Urijah heard it, he was afraid and fled, and went to Egypt. Then Jehoiakim the king sent men to Egypt: Elnathan the son of Achbor, and other men who went with him to Egypt. And they brought Urijah from Egypt and brought him to Jehoiakim the king, who killed him with the sword and cast his dead body into the graves of the common people. (Jer 26:20-23 NKJ)
When you first read the opening verses of Daniel, it seems unfair that God would place Jehoiakim king of Judah into the hands of Nebuchadnezzar king of Babylon. The truth is Jehoiakim had already sold out physically and spiritually. Jehoiakim was placed on the throne by the king of Egypt, but when Egypt was captured by the Babylonians, Jehoiakim switches allegiance, paying tribute with articles from the temple treasury and sending some members of the royal court into captivity, as a kind of promissory note.
As a king Jehoiakim was godless. He had incestuous relations with his mother, daughter-in-law and his step-mother. He would murder any man who wife Jehoiakim took a liking to. Two prophets, Jeremiah and Urijah, brought the word condemning Jehoiakim’s lifestyle. We can choose to turn a blind eye to the sinful actions of kings, queens, prime ministers and presidents, but don’t expect God to do the same.