David left Gath and escaped to the cave1 of Adullam.2 When his brothers and his father's household heard about it, they went down to him there.
References for 1 Samuel 22:1
All those who were in distress or in debt or discontented gathered3 around him, and he became their leader. About four hundred men were with him.
References for 1 Samuel 22:2
From there David went to Mizpah in Moab and said to the king of Moab, "Would you let my father and mother come and stay with you until I learn what God will do for me?"
So he left them with the king of Moab,4 and they stayed with him as long as David was in the stronghold.
References for 1 Samuel 22:4
But the prophet Gad5 said to David, "Do not stay in the stronghold. Go into the land of Judah." So David left and went to the forest of Hereth.6
References for 1 Samuel 22:5