In 2 Samuel 4:4, we learn how Mephibosheth became lame:
2 Samuel 4:4 And Jonathan, Saul's son, had a son that was lame of his feet. He was five years old when the tidings came of Saul and Jonathan out of Jezreel, and his nurse took him up, and fled: and it came to pass, as she made haste to flee, that he fell, and became lame. And his name was Mephibosheth.
In 2 Samuel 9, we learn that David fetched Mephibosheth:
2 Samuel 9:
3 And the king said, Is there not yet any of the house of Saul, that I may shew the kindness of God unto him? And Ziba said unto the king, Jonathan hath yet a son, which is lame on his feet.
4 And the king said unto him, Where is he? And Ziba said unto the king, Behold, he is in the house of Machir, the son of Ammiel, in Lodebar.
5 Then king David sent, and fetched him out of the house of Machir, the son of Ammiel, from Lodebar.
Mephibosheth was very respectful to David ... he compared himself to a dead dog:
2 Samuel 9:6 Now when Mephibosheth, the son of Jonathan, the son of Saul, was come unto David, he fell on his face, and did reverence. And David said, Mephibosheth. And he answered, Behold thy servant!
7 And David said unto him, Fear not: for I will surely shew thee kindness for Jonathan thy father's sake, and will restore thee all the land of Saul thy father; and thou shalt eat bread at my table continually.
8 And he bowed himself, and said, What is thy servant, that thou shouldest look upon such a dead dog as I am?
David told Ziba that he (Ziba) was to serve Mephiboseth:
2 Samuel 9:
9 Then the king called to Ziba, Saul's servant, and said unto him, I have given unto thy master's son all that pertained to Saul and to all his house.
10 Thou therefore, and thy sons, and thy servants, shall till the land for him, and thou shalt bring in the fruits, that thy master's son may have food to eat: but Mephibosheth thy master's son shall eat bread alway at my table. Now Ziba had fifteen sons and twenty servants.
11 Then said Ziba unto the king, According to all that my lord the king hath commanded his servant, so shall thy servant do. As for Mephibosheth, said the king, he shall eat at my table, as one of the king's sons.
12 And Mephibosheth had a young son, whose name was Micha. And all that dwelt in the house of Ziba were servants unto Mephibosheth.
13 So Mephibosheth dwelt in Jerusalem: for he did eat continually at the king's table; and was lame on both his feet.
When David fled before Absalom, Ziba brought livestock and food (which belonged to Mephibosheth) to David ... and Ziba lied to David. At that point, David gave to Ziba all that belonged to Mephiboseth:
2 Samuel 16:
1 And when David was a little past the top of the hill, behold, Ziba the servant of Mephibosheth met him, with a couple of asses saddled, and upon them two hundred loaves of bread, and an hundred bunches of raisins, and an hundred of summer fruits, and a bottle of wine.
2 And the king said unto Ziba, What meanest thou by these? And Ziba said, The asses be for the king's household to ride on; and the bread and summer fruit for the young men to eat; and the wine, that such as be faint in the wilderness may drink.
3 And the king said, And where is thy master's son? And Ziba said unto the king, Behold, he abideth at Jerusalem: for he said, To day shall the house of Israel restore me the kingdom of my father.
4 Then said the king to Ziba, Behold, thine are all that pertained unto Mephibosheth. And Ziba said, I humbly beseech thee that I may find grace in thy sight, my lord, O king.
After the death of Absalom, David returned ... Mephibosheth met David when he returned:
2 Samuel 19:
24 And Mephibosheth the son of Saul came down to meet the king, and had neither dressed his feet, nor trimmed his beard, nor washed his clothes, from the day the king departed until the day he came again in peace.
Note that Mephibosheth had not taken care of himself from the time David fled from Absalom until David returned ... this is a sign of grief on the part of Mephibosheth. Mephibosheth grieved the departure of David. Mephibosheth believed David was the rightful king ... not Absalom ... nor himself (as Ziba had implied).
David learns that Ziba had lied to him ...
2 Samuel 19:
25 And it came to pass, when he was come to Jerusalem to meet the king, that the king said unto him, Wherefore wentest not thou with me, Mephibosheth?
26 And he answered, My lord, O king, my servant deceived me: for thy servant said, I will saddle me an ass, that I may ride thereon, and go to the king; because thy servant is lame.
27 And he hath slandered thy servant unto my lord the king; but my lord the king is as an angel of God: do therefore what is good in thine eyes.
28 For all of my father's house were but dead men before my lord the king: yet didst thou set thy servant among them that did eat at thine own table. What right therefore have I yet to cry any more unto the king?
Mephibosheth declines David's offer:
2 Samuel 19:
29 And the king said unto him, Why speakest thou any more of thy matters? I have said, Thou and Ziba divide the land.
30 And Mephibosheth said unto the king, Yea, let him take all, forasmuch as my lord the king is come again in peace unto his own house.
Mephibosheth was wholly satisfied that David had returned in peace.
.