The narrator wished to show David as God's representative who honored the position of King Saul (the "Lord's anointed,") so he portrays the Amalekite as lying about incident to gain a reward from David.
David said to the youth who was reporting to him, “How do you know that Saul and his son Jonathan are dead?” 6 The youth reporting to him replied: “I happened to find myself on Mount Gilboa and saw Saul leaning on his spear, with chariots and horsemen closing in on him... 9 Then he said to me, ‘Stand over me, please, and put me to death, for I am in great suffering, but still alive.’ 10 So I stood over him and put him to death, for I knew that he could not survive his wound. I removed the crown from his head and the armlet from his arm and brought them here to my lord.”
The report does not quite match the one in 2 Sam. 31, where Saul's armor bearer commits suicide along with Saul after seeing that the king had died. But the two reports do agree that Saul attempted to end his own life. The question arises as to whether the armor-bear was mistaken in thinking Saul was dead, or the Amalekite youth was lying in hope that David would reward him for his supposed role in his rival's death. Being a supporter of David's kingship, narrator implies that the Amalekite was lying andbut accepts the idea that Saul had intentionally fallen on his own weapon. He takes David's interpretation as being correct when he declares to the Amalekite:
“Your blood is on your head, for you testified against yourself when you said, ‘I put the Lord’s anointed to death.’”
So the author of 1 Samuel knew of Saul's (attempted) suicide from the Amalekite's report and David's response. The narrator, a supporter of David, casts the Amalekite as embellishing the story to seek reward from David.