Doeg Knew All Twenty-Two Letters and Still Betrayed David
Midrash Tehillim reads David's declaration of trust in Psalm 7 as a meditation on the twenty-two letters of the Hebrew alphabet, which contain the totality of Torah. Then it confronts the fact that Doeg the Edomite knew every letter and every law and still informed on the priests of Nob, proving that knowledge without loyalty is the most dangerous combination.
Table of Contents
Doeg the Edomite was, by the Talmud's account, the greatest Torah scholar of his generation. He knew the law. He could recite. He could derive. When David fled from Saul and came to the priests at Nob, asking for bread and a weapon, Doeg was there, watching (1 Samuel 21:7). A witness who knew exactly what he was witnessing and exactly what he would do with the information.
He informed. He told Saul that the priest Ahimelech had helped David, had given him the showbread and the sword of Goliath. Saul ordered the priests killed. When his own servants refused, Doeg did it himself. Eighty-five priests died that day, plus the entire population of the priestly city of Nob, men and women and children and animals (1 Samuel 22:18-19). The greatest scholar of his time executed an entire priestly city.
Midrash Tehillim, assembled in the land of Israel between the fifth and seventh centuries CE, places this betrayal inside a remarkable linguistic reading of Psalm 7. Rabbi Yochanan notices that the Hebrew phrase "in you I have trusted" contains exactly twenty-two letters, the full count of the Hebrew alphabet. Trust in God, he says, is woven from the same building blocks as the Torah itself. From Aleph to Tav, everything.
What Can Twenty-Two Letters Do When Used Against Their Source?
The twenty-two letters of the Hebrew alphabet carry, in Jewish tradition, a significance far beyond their phonetic function. Sefer Yetzirah, the ancient mystical text on creation attributed in tradition to Abraham and dated by scholars to somewhere between the second and sixth centuries CE, describes how God created the world using the twenty-two letters as his tools, combining and permuting them to produce every existing thing. Each letter is a channel of divine energy, a structural element of reality.
The 2,847 texts of the Kabbalah tradition build extensively on this foundation. The Zohar, first published c. 1290 CE in Castile, Spain by Moshe de Leon, describes the Torah's letters as black fire written on white fire, meaning the visible text against the invisible background of meaning that surrounds it. When Rabbi Yochanan says David's trust was expressed in twenty-two letters, he is saying that David's trust encompassed the full range of what can be said and known and created.
Doeg also knew the twenty-two letters. He knew them better than almost anyone alive. That is what makes his betrayal so precise a case study in the Midrash. Knowledge of the alphabet is not trust. Knowledge of the Torah's letters is not loyalty to what the Torah commands.
Doeg and Ahithophel as Lions in David's Life
The Midrash Tehillim moves from the letter count to the image in Psalm 7:2: "Lest he tear my soul like a lion, rending it in pieces." Rabbi Yochanan identifies the lions explicitly: Doeg and Ahithophel. The tradition about Doeg records that his wickedness was hidden for years beneath his reputation as a scholar, only fully exposed when he acted.
Ahithophel was David's chief political advisor, described in 2 Samuel 16:23 as someone whose counsel was like receiving the word of God itself. He was the finest strategic mind of the kingdom. When Absalom rebelled against David, Ahithophel switched sides without hesitation and advised Absalom to sleep with David's concubines publicly as a declaration of irrevocable break. When Absalom rejected his military advice in favor of Hushai's inferior plan, Ahithophel went home, put his affairs in order, and hanged himself (2 Samuel 17:23). He could not survive being wrong.
Two men, Doeg and Ahithophel, the most learned and the most strategically brilliant figures in David's world, both destroyed him when they turned. The 3,205 texts of Midrash Aggadah treat both cases as warnings about the particular danger of talent without yirat shamayim, fear of heaven. Skill amplifies whatever is already in the person. In people of bad character, great skill produces proportionally great damage.
David's Trust as Counterpoint
Against these two lions, the Midrash reads David's Psalm 7 as his declaration that his trust does not rest in human intelligence or political alliance. "In you, with your Torah, I have trusted," Rabbi Yochanan expands the phrase. The trust is not in the twenty-two letters as an abstract system. It is in the God who gave the letters their meaning. Doeg knew the letters. David trusted the One behind them.
The Talmud's tractate Sanhedrin (c. fifth century CE, Babylonian compilation) contains a devastating assessment of Doeg: he has no share in the world to come. The same tractate says this of very few named individuals. The reasoning given is that Doeg used his Torah knowledge as a weapon rather than as a guide. He did not merely fail to practice what he preached; he weaponized his learning against the priests whose lives embodied what he knew.
The Legends of the Jews describes Doeg's death as a deterioration, his Torah knowledge evaporating from him progressively as his life advanced, until at the end he had forgotten what he once knew. The scholars who observed this understood it as a natural consequence: Torah cannot be retained in a vessel that has rejected its purposes. The letters remain but the meaning drains away.
The Alphabet as Covenant Document
The interpretive move Rabbi Yochanan makes in Midrash Tehillim, connecting David's trust to the twenty-two-letter count, elevates the alphabet itself to the status of a covenant document. When David says he trusts God from Aleph to Tav, he is making a declaration that encompasses everything. There is no domain of experience, no letter in the range of human expression, outside the scope of that trust.
The 742 texts of the Mekhilta, the tannaitic commentary on Exodus assembled by the school of Rabbi Ishmael in second-century Roman Palestine, describe the giving of the Torah at Sinai as the moment when the twenty-two letters became the property of Israel. Doeg had access to that inheritance. He carried the letters in his mind and used them to devastate eighty-five priests and an entire city. David had the same letters and used them to write psalms that have sustained Jewish prayer for three thousand years.
The Midrash does not say that knowledge is dangerous. It says that knowledge separated from the trust its source requires becomes a lion. You cannot domesticate a lion by knowing its Latin name.