Ahaziah’s downfall came from God when he went to visit Joram. When Ahaziah arrived, he went out with Joram to meet Jehu son of Nimshi, whom the LORD had anointed to destroy the house of Ahab.
We have here an account of the reign of Ahaziah, a short reign (of one year only), yet long enough, unless it had been better. He was called Jeho-ahaz (Ch2 21:17); here he is called Ahaz-iah, which is the same name and of the same signification, only the words of which it is compounded are transposed.
Commenting on 2 Chronicles 22:1-9
And it came to pass, that when Jehu was executing judgment on the house of Ahab,.... On Joram, his son, and seventy more sons, his kinsfolks, courtiers, and priests: and found the princes of Judah, and or even the sons of the brethren of Ahaziah; whose number was forty two: that ministered to Ahaziah; had offices in his court, or in obedience to his will...
And the destruction of Ahaziah was of God by coming to Joram: for when he was come, he went out with Jehoram against Jehu the son of Nimshi, whom the LORD had anointed to cut off the house of Ahab. (f) By this we see that nothing can come to any but by God's providence and as he has appointed, and therefore he causes everything to serve his purposes.