David left Gath and escaped to Adullam's fortress. When David's siblings and all his extended family learned of this, they went to join him there.
References for 1 Samuel 22:1
Everyone who was in trouble, in debt, or in desperate circumstances gathered around David, and he became their leader. Approximately four hundred men joined him.
From there David went to Mizpeh in Moab. He said to the Moabite king, "Please let my father and mother stay with you until I know what God will do to me."
So David left his parents with the Moabite king, and they stayed with him the whole time David was in the fortress.
Then the prophet Gad told David, "Don't stay in the fortress any longer. Leave now and go to the land of Judah." So David left and went to Hereth forest.
Saul learned that David and his soldiers had been located. Saul was sitting under the tamarisk tree on the hill at Gibeah, spear in hand, with all his servants waiting on him.
References for 1 Samuel 22:6
He said to them, "Listen up, Benjaminites! Will Jesse's son give fields and vineyards to each and every one of you? Will he make each one of you commanders of units of one thousand men or commanders of units of one hundred?
Is that why all of you have conspired against me? No one informed me when my son made a covenant with Jesse's son! Not one of you is concerned about me or informs me when my own son sets my servant against me in an ambush—but that's what has happened today!"
Doeg the Edomite, who was standing with Saul's servants, responded, "I saw Jesse's son go to Ahimelech, Ahitub's son, at Nob.
Ahimelech questioned the LORD for David, and gave him provisions as well as the sword of Goliath the Philistine."
The king then sent for the priest Ahimelech, Ahitub's son, and all his extended family, who were the priests at Nob. All of them came to the king.
"Listen here, son of Ahitub," Saul said. "Yes sir," he replied.
Saul said to him, "Why have you conspired against me—you with Jesse's son—giving him food and a sword and questioning God for him so that he is now against me, waiting in ambush, which is what has happened today?"
Ahimelech answered the king, "Out of all your servants, who is as trustworthy as David? He is the king's son-in-law, does whatever you ask, and is well respected in your house.
Was that the first time I questioned God for him? Of course not! But please, the king shouldn't accuse me, his servant, or anyone in my father's household of any wrongdoing, because your servant knew nothing whatsoever about this matter."
But the king said, "You will be executed, Ahimelech—you and all of your father's household!"
The king ordered the guards waiting on him: "Go ahead and kill the LORD's priests because they've joined up with David too. They knew he was on the run but didn't inform me." But the king's servants were unwilling to lift a hand to attack the LORD's priests.
The king then ordered Doeg, "Doeg! You go attack the priests." So Doeg the Edomite went and attacked the priests, killing eighty-five men who wore the linen priestly vest that day.
References for 1 Samuel 22:18
He put the whole priestly city of Nob to the sword: men and women, children and infants, even oxen, donkeys, and sheep.
But one of the sons of Ahimelech, Ahitub's son, escaped. His name was Abiathar, and he fled to David.
Abiathar reported to David that Saul had slaughtered the LORD's priests.
David told Abiathar, "That day, when Doeg the Edomite was there, I knew that he would tell Saul everything. I am to blame for the deaths in your father's family.
References for 1 Samuel 22:22
Stay with me, and don't be afraid. The one who seeks my life now seeks yours too. But you'll be safe with me."