1 Samuel 22:16

And the king said, Thou shalt surely die, Ahimelech, thou, and all thy father’s house.

This took place after David slew Goliath, when Saul kept David with him and would not let him return to his father's house. At that time Jonathan loved David as his own soul and covenanted to be united with him as brethren, giving him his robe and his garments, even his sword and his bow and his girdle. David was entrusted with important responsibilities yet remained modest and won the affection of the people and of the royal household.

The king's words are a sentence of death against Ahimelech and all his father's house. That sentence was driven by Doeg's misleading report and the king's rage, not by a command from God. Doeg carried the sentence out by killing Ahimelech and the priests and then destroying the inhabitants of Nob. The episode shows the king acting under Satan's control and reveals the perversity of a heart that rejects God's guidance.