Following their advice, he joined King Joram of Israel in a war against King Hazael of Syria. The armies clashed at Ramoth in Gilead, and Joram was wounded in battle.
He returned to the city of Jezreel to recover from his wounds, and Ahaziah went there to visit him.
God used this visit to Joram to bring about Ahaziah's downfall. While Ahaziah was there, he and Joram were confronted by a man named Jehu son of Nimshi, whom the Lord had chosen to destroy the dynasty of Ahab.
As Jehu was carrying out God's sentence on the dynasty, he came across a group made up of Judean leaders and of Ahaziah's nephews that had accompanied Ahaziah on his visit. Jehu killed them all.
A search was made for Ahaziah, and he was found hiding in Samaria. They took him to Jehu and put him to death. But they did bury his body out of respect for his grandfather King Jehoshaphat, who had done all he could to serve the Lord. No member of Ahaziah's family was left who could rule the kingdom.
As soon as King Ahaziah's mother Athaliah learned of her son's murder, she gave orders for all the members of the royal family of Judah to be killed.
Ahaziah had a half sister, Jehosheba, who was married to a priest named Jehoiada. She secretly rescued one of Ahaziah's sons, Joash, took him away from the other princes who were about to be murdered and hid him and a nurse in a bedroom at the Temple. By keeping him hidden, she saved him from death at the hands of Athaliah.