David said the man’s own testimony condemned him because he claimed to have struck down the LORD’s anointed. David ordered his execution on that basis. See 2 Samuel 1:14–16.
David questions the messenger about his identity and hears that he is an Amalekite living as a resident outsider. David then confronts him with the moral shock of claiming to have killed the king whom Yahweh had set apart. David orders one of his men to execute the messenger, and the man dies. This unit continues the opening scene of 2 Samuel 1:1–12, where David receives news of Saul’s death and responds with public grief rather than celebration. The messenger has already narrated how he killed Saul, presenting the story as a service to David.
The passage treats Saul’s kingship as something set apart by Yahweh (“Yahweh’s anointed”). David’s shock in verse 14 is not mainly personal rivalry or political convenience; it is a moral reaction to the claim that someone “put forth his hand” to destroy the anointed king. The messenger’s identity matters to the story.
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with 2 Samuel 1:14-16, then read the surrounding section so the answer stays connected to the passage's flow.
14David said to him, How were you not afraid to put forth your hand to destroy Yahweh`s anointed?
15David called one of the young men, and said, Go near, and fall on him. He struck him, so that he died.
16David said to him, Your blood be on your head; for your mouth has testified against you, saying, I have slain Yahweh`s anointed.