Jehoiakim was a king of Judah, also called Eliakim. He was made king by the king of Egypt, who conquered his brother Jehoahaz, who went to Egypt as a captive and evidently died there. 2 Chronicles 36:4, “And the king of Egypt made Eliakim his brother king over Judah and Jerusalem, and turned his name to Jehoiakim. And Necho took Jehoahaz his brother, and carried him to Egypt.”
Jehoiakim “did evil in the Lord’s sight” (2 Kings 23:37) and the people remained idolatrous.
Jehoiakim later surrendered to Nebuchadnezzar after the famous “Battle of Carchemish,” a victory of Nebuchadnezzar over the Egyptian forces that had marched northward to the Euphrates to withstand Babylon. Jeremiah 46:2 speaks of this battle, “Against Egypt, against the army of Pharaohnecho king of Egypt, which was by the river Euphrates in Carchemish, which Nebuchadrezzar king of Babylon smote in the fourth year of Jehoiakim the son of Josiah king of Judah.”
This “fourth” year is given in Daniel 1:1 as the “third year,” Daniel using an accession year reckoning, and Jeremiah a non-accession year reckoning. (That is, Daniel counts the year a king came to the throne as year “zero,” or “accession,” and the next year as “one” – Jeremiah counted that as year “one.” Same year, two different ways of numbering it.)
At this time, Daniel and his three Hebrew friends, Shadrach, Meshach and Abednego went captive with Daniel. At the same time, Nebuchadnezzar bound Jehoiakim for captivity also, but evidently released him on agreement that Jehoiakim would be subordinate and faithful to Nebuchadnezzar. Thus 2 Chronicles 36:5,6, “Jehoiakim was twenty and five years old when he began to reign, and he reigned eleven years in Jerusalem: and he did that which was evil in the sight of the LORD his God. Against him came up Nebuchadnezzar king of Babylon, and bound him in fetters (chains), to carry him to Babylon.” But evidently he then released Jehoiakim on agreement to govern Jerusalem on behalf of Nebuchadnezzar.
However, Jehoiakim later revolted and asserted his independence. Jehoiakim died at Jerusalem after an 11-year reign, and his son Jehoiachin became king – but only for three months – before Nebuchadnezzar returned, Jehoiachin surrendered and was taken captive to Babylon. Nebuchadnezzar then replaced Jehoiachin with his (Jehoiachin’s) uncle, Zedekiah, son of King Josiah. Zedekiah ruled then for 11 years, but he also rebelled from Nebuchadnezzar, who thus returned, captured the city, burned the temple, put out the eyes of Zedekiah and took him to Babylon where he died.
Meanwhile Jehoiachin as captive in Babylon remained so until the passing of Nebuchadnezzar. Then the son of Nebuchadnezzar, Amel-Marduk (the “Evil-Merodach” of 2 kings 25:27) elevated Jehoiachin from his bondage, treated him well and cared for him for the remainder of his years.
2 Kings 25:27-30, “And it came to pass in the seven and thirtieth year of the captivity of Jehoiachin king of Judah, in the twelfth month, on the seven and twentieth day of the month, that Evilmerodach king of Babylon in the year that he began to reign did lift up the head of Jehoiachin king of Judah out of prison; and he spake kindly to him, and set his throne above the throne of the kings that were with him in Babylon; and changed his prison garments: and he did eat bread continually before him all the days of his life. And his allowance was a continual allowance given him of the king, a daily rate for every day, all the days of his life.”
As it turned out, this Jehoiachin was the ancestor of Jesus.