Doeg, Achimelech and the Massacre at Nov
Achimelech feeds the fleeing Dovid, Doeg informs, and Shaul wipes out the city of Nov. Hashem then holds Dovid accountable and offers him a choice of punishments.
Shaul HaMelech considered Dovid HaMelech to be a traitor and therefore deserving of the death penalty. Dovid HaMelech, who knew he was innocent, had no choice but to flee. But with no food, he was forced to turn to Achimelech, the Kohen Gadol, for help. Achimelech provided him with the lechem ha’panim and Goliath’s sword. Doeg, who was personally jealous of Dovid, reported this to Shaul. Shaul ruled that Achimelech and the entire city of Nov were aiding and abetting a traitor and therefore they were likewise determined to be traitors. Shaul ordered that the entire city be wiped out.
The Gemara in Sanhedrin records that Hashem spoke to Dovid and told him that he was deserving of a punishment for what happened to the city of Nov. Dovid was likewise held accountable for the fact that Shaul and three of his sons were killed as a punishment from Hashem for ordering the attack on Nov. Finally, Dovid was also held accountable for the fact that Doeg, whose slander enabled the tragedy to occur, lost his portion in the World to Come.