2 Samuel 15:31

15:31 Now David had been told, “Ahithophel has sided with the conspirators who are with Absalom. So David prayed, “Make the advice of Ahithophel foolish, O Lord!”

2 Samuel 17:23

17:23 When Ahithophel realized that his advice had not been followed, he saddled his donkey and returned to his house in his hometown. After setting his household in order, he hanged himself. So he died and was buried in the grave of his father.