Sheba's Rebellion and Joab's Actions
Whenever there are divisions among a people, inevitably someone will attempt to assert himself over others into a position of authority. Such is the case with the Benjamite Sheba. Taking advantage of the situation that exists in Israel, with the northern tribes in general rebellion (verse 2), Sheba calls for the army of Israel to follow him against Judah and the king.
David sends Amasa to gather the men of Judah before him. When he does not return in the prescribed time, David places Abishai over the men of Judah to pursue Sheba. Joab is serving under Abishai at this point.
Upon meeting Amasa, Joab kills him—his own cousin—with no established guilt. Joab's self-justification was probably based, in part, on the fact that Amasa had previously joined Absalom and had served as his general. Yet that crime was pardoned. And in the present situation, it is not known why Amasa was late. Joab didn't even ask him! As we've seen, Joab is a man who continually takes matters into his own hands, sometimes breaking the law or violating direct orders in the process. Worse, Joab may have killed Amasa out of spite for taking his job—or as a political move to regain his position. Eventually these sins will catch up with him (1 Kings 1:5-6; 1 Kings 2:28-35).
Joab and his men come to "Abel of Beth Maacah" (2 Samuel 20:15), in northern Galilee four miles west of Dan, where Sheba is holed up. In seeking peace for her city, a wise woman dealing with Joab is able to convince her city to deliver the head of Sheba to Joab, thus resolving the conflict.
In the end, Joab ends up back over the army (verse 23).