You took Saul's kingdom, and now the Lord is punishing you for murdering so many of Saul's family. The Lord has given the kingdom to your son Absalom, and you are ruined, you murderer!”
This was because the people of Ammon and Moab did not give food and water to the Israelites on their way out of Egypt. Instead, they paid money to Balaam to curse Israel, but our God turned the curse into a blessing.