[1] After Joab led the assault on the fortress of Mount Zion, David made him captain of his army (2 Samuel 8:16; 20:23; 1 Chronicles 11:4–6; 18:15; 27:34).
However, David could not bring himself to harm his son, and ordered that none of his men should kill Absalom during the ensuing battle.
However, when a man reported that Absalom had been found alive and caught in a tree, Joab and his men killed him (2 Samuel 18:1–33).
Hearing this, Joab fled to the Tent of the Tabernacle (where Adonijah had previously sought successful refuge according to 1 Kings 1:50–53) and told Benaiah that he would die there.
The ATS Bible Dictionary describes Joab as "a valiant warrior, and an able general; and his great influence on public affairs was often exerted for good, as in the rebellion of Absalom, and the numbering of Israel ... [b]ut as a man he was imperious, revengeful, and unscrupulous".