When Joab left David, he sent messengers after Abner. They met up with him at the well of Sirah and brought him back, but David didn't know anything about it.
When Abner arrived back in Hebron, Joab took him aside into the town gatehouse as if he was going to talk with him in private. But Joab stabbed him in the belly, killing him in revenge for killing Joab's brother Asahel.