Saul had previously displayed enmity toward David, born of jealousy (1 Samuel 18:8–9) and fear (1 Samuel 18:12, 1 Samuel 18:15, 1 Samuel 18:29). Most likely this is what motivated and drove his decision to kill.1
At the end of 1 Samuel 18 it seemed natural that Saul would give things a rest and let go of his desire to kill David. All of his plans have come to nothing. Indeed, they’ve had the opposite effect. Instead of David being dead or wounded, he now has more battle experience, more wisdom, more friends and his right hand on the throne through his marriage to Saul’s daughter, Michal. It doesn’t make sense to keep fighting against the Lord and his anointed one. It doesn’t make sense to keep ignoring God’s word in the vain hope of remaining in power. Saul’s time as king has come to an end; he needs to accept reality. He needs to be reconciled with God.
Knowing what is right and doing what is right is not the same however, and so in his foolishness (cf. 1 Samuel 26:21) Saul continues to pretend as if his plans take priority over those of the Lord. He simply won’t have David replacing him as king.
1 And Saul spoke to Jonathan his son and to all his servants, that they should kill David. But Jonathan, Saul’s son, delighted much in David.