When Edom rebelled and declared independence from Judah and made themselves a king, Jehoram took his armies out at night in an attempt to crush the rebellion. The Edomites were ready for him. Jehoram barely escaped with his life. Soon after this incident, Libnah also revolted and became self-governing apart from Judah's control.
Jehoram made high places in the mountains of Judah and led the people of Jerusalem into immorality, compelling the people of Judah to sin. The prophet, Elijah, sent Jehoram a letter.
“Thus says the Lord God of your father David: Because you have not walked in the ways of Jehoshaphat your father, or in the ways of Asa king of Judah, but have walked in the way of the kings of Israel, and have made Judah and the inhabitants of Jerusalem to play the harlot like the harlotry of the house of Ahab, and also have killed your brothers, those of your father's household, who were better than yourself, behold, the Lord will strike your people with a serious affliction -- your children, your wives, and all your possessions; and you will become very sick with a disease of your intestines, until your intestines come out by reason of the sickness, day by day.”
Elijah was wise not to deliver this message in person. Soon, as foretold, adversities began. The Philistines and the Arabians broke into Judah, even into the king's house and stole all they could carry away, including Jehoram's wives and sons, killing them all, except Athaliah and Jehoram's youngest son, Ahaziah.
After this, Jehoram contracted a gastrointestinal disease, which he suffered for two years. He finally died a miserable and painful death. There was no official funeral, and he was buried somewhere in Jerusalem, but not in the sepulchers of the kings. Jehoram's youngest son, Ahazaiah, was made king. (2 Kings 8:16-24; 2 Chronicles 21)