David asked his son Solomon to murder Joab for him.
Now the days of David drew nigh that he should die; and he charged Solomon his son, saying … thou knowest also what Joab the son of Zeruiah did to me … let not his hoar head go down to the grave in peace. 1 Kings 2.1-6So Solomon sent Benaiah to murder Joab.
It was told king Solomon that Joab was fled unto the tabernacle of the LORD; and, behold, he is by the altar. Then Solomon sent Benaiah … saying, Go, fall upon him … So Benaiah … fell upon him, and slew him. 2 Kings 2.29-34And another person that David asked his son to murder was Shimei.
Thou hast with thee Shimei … which cursed me with a grievous curse in the day when I went to Mahanaim: but he came down to meet me at Jordan, and I sware to him by the LORD, saying, I will not put thee to death with the sword. Now therefore hold him not guiltless: for thou art a wise man, and knowest what thou oughtest to do unto him; but his hoar head bring thou down to the grave with blood. 1 Kings 2.8-9So Solomon sent Benaiah to “fall on” Shimei, too.
So the king commanded Benaiah ... which went out, and fell upon him, that he died. 1 Kings 2.44-46God, of course, wanted these people murdered, too. God approved of everything David did, except for the matter of Uriah (1 Kings 15.5).
God's next killing: A tale of two prophets