In this chapter, David wins a battle against Absalom's men and Absalom dies.
Absalom dies. Spoiler alert! Now that's a lesson to all of you who want to read my commentary before reading the chapter itself.
Anyway, this chapter begins with David and his men gathering in the town of Mahanaim (the area originally named by Jacob back in Gen 32). We see David assign three commanders over the army, including both Joab and Abishai, and himself commands none of the army. In fact, "the troops" tell David that he should not go out with them. I have stated over and over that David is no longer behaving like the strong military commander of his youth, and this chapter seems to confirm it again.
Although in this chapter David expresses his desire to go out with the men, it is clear that he is much more valuable as a political figurehead than as a field commander. He sinned with Bathsheba when he was staying in Jerusalem and all the men were going out to war, but now it is his men who urge David to remain in the city while they go out to fight his enemies.
The second recurring theme of this chapter is David's gentle attitude towards his children, even when they are literally fighting against him. In this case, he commands his army to "be gentle with the young man Absalom". Remember that David killed the Amalekite who (claimed he) slew Saul (2 Samuel 1:14-15), and later he killed Rechab and Baanah because they killed Ish-Bosheth. This is how David treats the men who kill his enemies, then how much more should his own men feel afraid to lay hands on David's son, even when Absalom is rising in rebellion against him?
I think in some cultures and some situations, David's gentleness towards his children could be excused. If he were not king and were not living in such a heavily patriarchal society, perhaps he could behave in this way without having any adverse consequences. But in a society like Israel's and with himself sitting as the ultimate authority over the country, his gentleness towards his children ultimately leads to the deaths of both Absalom and Amnon, and it is worse than if he had killed Amnon himself because then Absalom probably would not have revolted.
I mean, let us remember what was Absalom's chief criticism of David: that the people of Israel were bringing proper claims but not getting justice. And in at least one situation, the life of Tamar, Absalom was absolutely correct. Tamar did not get justice, because David refused to take action against Amnon. Although Absalom likely has personal ambition behind his actions, I think it's also plausible that he has a personal grievance against David because of what happened to Tamar, and frankly he would be right.
In the end, it's just really unfortunate how all these things turned out. I don't think David ever meant to do harm to his children, and indeed it seems that he means only to do them good, and that is probably a big reason why God never openly rebukes him about his behavior towards his children. But he really caused himself a lot of grief through his behavior, and not himself alone. 20,000 men die in this battle that his men are fighting to regain David his throne. And that just goes to show how the sins of a powerless man can harm a few, but the sins of a powerful man can harm many, and David was definitely a powerful man. God made him king because David was a man after God's own heart and was inclined to rule justly and to do good. But in the end, David proves himself to be only a man, fallible and flawed like every other, and though he mostly does good, his sins are very costly.
Anyway, the battle spreads out in a forest and somehow the forest kills more than the sword? Rashi suggests that "the forest" refers to the numerous wild animals that still lived there and preyed upon the soldiers as they wandered, or perhaps attacked the wounded men. Another possibility is that men died from treacherous conditions in the forest. Either way, it paints a much more perilous vision of forests than what we find in modern life after mankind has exterminated many of the large predator species that used to live in the Mideast, Europe and America.
Also, the battle site is called the "forest of Ephraim" even though (as will later be made clear) the battle is happening east of the Jordan. Ephraim's tribal inheritance is west of the Jordan, so it is peculiar that the forest would refer to a tribe that did not dwell in this land. Rashi explains that when Joshua divided the land, he allowed that any forest land may be used as pasture for animals, and therefore the Ephraimites must have taken their animals across the Jordan to pasture in this particular forest. I don't know what verse in Joshua makes this allowance, however. Joshua 17 has some discussion about Ephraim and Manasseh being ordered to clear out the forests in the "hill country" of Israel. It's possible that the Talmud expands on this passage and Rashi is obliquely referencing it, but I don't know enough to figure that out.
Absalom dies a particularly humiliating death, having his "head caught in a tree". Possibly this refers to his luxurious, abundant hair (2 Sam 14:26) getting entangled in the thick branches, and to complete the humorous picture, his mule didn't seem to notice and just keeps going, leaving Absalom dangling from the tree. Alas, if only Absalom had cut his hair before going to battle, this might not have happened. David's men see him hanging there, but afraid of David's wrath, they leave him unharmed and go tell Joab.
Joab once again shows that he is a ruthless man and while he is acting to defend David's kingship, he also disregards David's command to preserve Absalom's life. Joab helps David, but he clearly does not fear David like the other men do. Of course, Joab has gotten away with murder before, and Absalom is a much more dangerous and destructive person than Abner (who Joab murdered). Joab kills Absalom in battle, which is a further mitigating factor. So while Joab is killing a defenseless man, I think his action here is arguably the right thing to do. While I previously blamed David for Absalom's rebellion, Absalom also bears responsibility for the 20,000 men that die under his authority, so he is not at all innocent here.
After Absalom dies, he is buried under a pile of rocks, which is not unusual for the time (cairns were a popular thing in the Mideast, such as Gen 31 "witness heap"), but it's also possible that this was meant to juxtapose with the pillar that we are told Absalom constructed in verse 18 to honor himself. He built a pillar in honor of himself during his life, and the men who killed him built a pile of rocks to mark the place where he died.
Verse 18 is also interesting because Absalom claims he has no son. This is apparently contradicted by 2 Samuel 14:27, where Absalom is noted to have 3 sons and a daughter. It's possible all his sons died, or it's also possible (as Rashi notes) that Absalom was specifically referring to sons who could equal him or carry on his legacy, and that his three sons were not notable or strong personalities. Either way, the sons of Absalom (like Kileab, the son of David) come to no account.
In the last part of this chapter, Ahimaaz requests to go tell the news to David, perhaps thinking to himself that he is bringing good news, "that the LORD has delivered him from the hand of his enemies" (v. 19). As Joab points out (and as I've partially discussed in 2 Samuel 1), Ahimaaz would have been given a reward if he came bringing good news, but David was concerned only over his son. Instead, Joab commands a Cushite (Egyptian) slave to go and bring the news to David, basically so that if David wants to shoot the messenger in his grief, he will only be killing a foreigner who is considered much less valuable than one of his own men or a fellow Israelite.
When Ahimaaz reaches David first, he announces that the battle went well, but equivocates when David asks about the fate of Absalom, probably recognizing that he was unlikely to benefit telling David the truth, and plausibly going to suffer for it. So while Ahimaaz would certainly have known Absalom was dead, he basically lies about that part to avoid David's anger.
What strikes me about this passage is that David's first question is about whether Absalom is safe. David doesn't care about the men, or Joab or the battle, what he wants to know is whether or not Absalom was harmed. And then when he finds out that Absalom is dead, his reaction is pure, unmitigated grief. Regretful, but this is the power of sin to cause grief. While David's sin caused grief in the lives of many, ultimately that grief comes roaring back into his own life with tremendous power.