Solomon wanted Joab to be killed because Joab attacked and killed Abner and Amasa without King David knowing about it.