2 Samuel 3:26

And when Joab was come out from David, he sent messengers after Abner, which brought him again from the well of Sirah: but David knew it not.

David had accepted Abner's offer to bring all the tribes of Israel over to him and had then dismissed Abner with honor. Joab's action in sending for Abner was done without David's knowledge. Joab sent messengers after Abner, and they brought him back from the well of Sirah. Joab was moved by jealousy at the favorable reception given to Abner as a valiant and famed warrior.

He was also driven by a blood feud to avenge his brother Asahel, whom Abner had slain during the war between Israel and Judah. He further acted to rid himself of a prospective rival. He then used Abner's return as the opportunity to basely waylay and murder him.