He remembers his friendship with Jonathan, you can read about it in 1 Samuel 17-19. Jonathan incurred the wrath of his father King Saul, in order to help David not be killed by him.
David asked this question:
1And David said, "Is there still anyone left of the house of Saul, that I may show him kindness for Jonathan’s sake?"He wanted to show kindness. So he finds an old servant, and this servant had the answer that he wanted. yes, there was family left.
"Are you Ziba?" And he said, "I am your servant." 3And the king said, "Is there not still someone of the house of Saul, that I may show the kindness of God to him?" Ziba said to the king, "There is still a son of Jonathan; he is crippled in his feet." 4The king said to him, "Where is he?" And Ziba said to the king, "He is in the house of Machir the son of Ammiel, at Lo-debar."And so Mephibosheth the son of Jonathan was brought before him (King David).
Mephibosheth was scared. He more than likely did not know what to expect from David. Would he die? Would he be expelled? What would truly happen to him?
And David bids him not to fear.
7And David said to him, "Do not fear, for I will show you kindness for the sake of your father Jonathan, and I will restore to you all the land of Saul your father, and you shall eat at my table always." 8And he paid homage and said, "What is your servant, that you should show regard for a dead dog such as I?"Mephibosheth, goes from having nothing, to having land and servants. David showed him mercy because of the friendship he had with Mephibosheth's father.
Isn't that cool?
The hatred that Saul had for David did not replace the love that was shared between two young friends. Love remembered.
Hmm... as I write this I am drawn to think of how God extends mercy to me. Me, who does stuff that should so much incur his wrath, but God instead calls me child. God shows me mercy, why? Because his son died for me. He called me to be his own and loves me despite all the enemy does to pull me away from him. What David did with Mephibosheth is just a small glimpse of what God has done, is doing and will continue to do for me.