1 Kings 22:52
And he did evil in the sight of the LORD, and walked in the way of his father, and in the way of his mother, and in the way of Jeroboam the son of Nebat, who made Israel to sin: And he did evil in the sight of the LORD, and walked in the way of his father, and in the way of his mother, and in the way of Jeroboam the son of Nebat, who made Israel to sin:
Ahaziah did evil in the sight of the Lord by walking in the way of his father Ahab and in the way of his mother Jezebel and in the way of Jeroboam the son of Nebat, who made Israel to sin. That evil course was not vague wrongdoing but definite service and worship of Baal, by which he provoked the Lord God of Israel to anger as Ahab his father had done.
He chose this course although he had witnessed God's mighty works and the warnings given against setting aside God's law, including the fearful end of his own father. Instead of humbling himself before God, he treated those realities as idle tales. Continuing in that Baal worship, he went on to seek help from Baal-zebub. His disastrous war with Moab and the accident that threatened his life came as judgments upon his rebellion.