First Kings 22:1-40 describes Ahab's miserable ending.
After three years of peace between Syria and Israel, Ahab wanted to fight against the king of Syria for Ramoth-gilead. Regarding this, the king of Judah, Jehoshaphat, was in alliance with Ahab (vv. 1-4).
Jehoshaphat proposed to Ahab that they ask for the word of Jehovah (v. 5). Ahab assembled about four hundred prophets and asked them if he should go against Ramoth-gilead to battle or refrain. These false prophets lied to him, saying that he should go ahead and that God would deliver the city into his hand. However, Micaiah, a real prophet of God, prophesied that all Israel would be scattered upon the mountains, like sheep that have no shepherd, and told Ahab that Jehovah had put a lying spirit into his prophets and had spoken evil concerning him. Then Micaiah was imprisoned by Ahab (vv. 6-28). Ahab refused to listen to the real prophet but listened instead to the false prophets.
Ahab and Jehoshaphat king of Judah went into battle. Ahab disguised himself so that others would not recognize him, but he was still defeated and killed in the battle (vv. 29-36). Ahab could hide from people, but he could not hide from God, who saw where he was and what he was doing. Nothing can be hidden from the eyes of God.
Ahab was buried in Samaria. Someone washed Ahab's blood from his chariot in the pool of Samaria, and the dogs licked his blood, according to what God had spoken (vv. 37-40a).
The way God dealt with Ahab shows how righteous and how merciful He is. On the one hand, God is kind; on the other hand, He is severe. We need to fear Him and to be serious with Him. We also need to be ready to reap what we have sown.