18:1 Then David mustered the men who were with him and set over them commanders of thousands and commanders of hundreds. 2 And David sent out the army, one third under the command of Joab, one third under the command of Abishai the son of Zeruiah, Joab's brother, and one third under the command of Ittai the Gittite. And the king said to the men, “I myself will also go out with you.” 3 But the men said, “You shall not go out. For if we flee, they will not care about us. If half of us die, they will not care about us. But you are worth ten thousand of us. Therefore it is better that you send us help from the city.” 4 The king said to them, “Whatever seems best to you I will do.” So the king stood at the side of the gate, while all the army marched out by hundreds and by thousands. 5 And the king ordered Joab and Abishai and Ittai, “Deal gently for my sake with the young man Absalom.” And all the people heard when the king gave orders to all the commanders about Absalom.
6 So the army went out into the field against Israel, and the battle was fought in the forest of Ephraim. 7 And the men of Israel were defeated there by the servants of David, and the loss there was great on that day, twenty thousand men. 8 The battle spread over the face of all the country, and the forest devoured more people that day than the sword.
9 And Absalom happened to meet the servants of David. Absalom was riding on his mule, and the mule went under the thick branches of a great oak,  and his head caught fast in the oak, and he was suspended between heaven and earth, while the mule that was under him went on. 10 And a certain man saw it and told Joab, “Behold, I saw Absalom hanging in an oak.” 11 Joab said to the man who told him, “What, you saw him! Why then did you not strike him there to the ground? I would have been glad to give you ten pieces of silver and a belt.” 12 But the man said to Joab, “Even if I felt in my hand the weight of a thousand pieces of silver, I would not reach out my hand against the king's son, for in our hearing the king commanded you and Abishai and Ittai, ‘For my sake protect the young man Absalom.’ 13 On the other hand, if I had dealt treacherously against his life  (and there is nothing hidden from the king), then you yourself would have stood aloof.” 14 Joab said, “I will not waste time like this with you.” And he took three javelins in his hand and thrust them into the heart of Absalom while he was still alive in the oak. 15 And ten young men, Joab's armor-bearers, surrounded Absalom and struck him and killed him.
16 Then Joab blew the trumpet, and the troops came back from pursuing Israel, for Joab restrained them. 17 And they took Absalom and threw him into a great pit in the forest and raised over him a very great heap of stones. And all Israel fled every one to his own home. 18 Now Absalom in his lifetime had taken and set up for himself the pillar that is in the King's Valley, for he said, “I have no son to keep my name in remembrance.” He called the pillar after his own name, and it is called Absalom's monument  to this day.
19 Then Ahimaaz the son of Zadok said, “Let me run and carry news to the king that the Lord has delivered him from the hand of his enemies.” 20 And Joab said to him, “You are not to carry news today. You may carry news another day, but today you shall carry no news, because the king's son is dead.” 21 Then Joab said to the Cushite, “Go, tell the king what you have seen.” The Cushite bowed before Joab, and ran. 22 Then Ahimaaz the son of Zadok said again to Joab, “Come what may, let me also run after the Cushite.” And Joab said, “Why will you run, my son, seeing that you will have no reward for the news?” 23 “Come what may,” he said, “I will run.” So he said to him, “Run.” Then Ahimaaz ran by the way of the plain, and outran the Cushite.
24 Now David was sitting between the two gates, and the watchman went up to the roof of the gate by the wall, and when he lifted up his eyes and looked, he saw a man running alone. 25 The watchman called out and told the king. And the king said, “If he is alone, there is news in his mouth.” And he drew nearer and nearer. 26 The watchman saw another man running. And the watchman called to the gate and said, “See, another man running alone!” The king said, “He also brings news.” 27 The watchman said, “I think the running of the first is like the running of Ahimaaz the son of Zadok.” And the king said, “He is a good man and comes with good news.”
28 Then Ahimaaz cried out to the king, “All is well.” And he bowed before the king with his face to the earth and said, “Blessed be the Lord your God, who has delivered up the men who raised their hand against my lord the king.” 29 And the king said, “Is it well with the young man Absalom?” Ahimaaz answered, “When Joab sent the king's servant, your servant, I saw a great commotion, but I do not know what it was.” 30 And the king said, “Turn aside and stand here.” So he turned aside and stood still.
31 And behold, the Cushite came, and the Cushite said, “Good news for my lord the king! For the Lord has delivered you this day from the hand of all who rose up against you.” 32 The king said to the Cushite, “Is it well with the young man Absalom?” And the Cushite answered, “May the enemies of my lord the king and all who rise up against you for evil be like that young man.” 33  And the king was deeply moved and went up to the chamber over the gate and wept. And as he went, he said, “O my son Absalom, my son, my son Absalom! Would I had died instead of you, O Absalom, my son, my son!” (ESV)