Overview
The story and metaphor of The Dog in the Manger derives from an old Greek fable which has been transmitted in several different versions. Interpreted variously over the centuries, the metaphor is now used to speak of one who spitefully prevents others from having something for which one has no use. Although the story was ascribed to Aesop's Fables in the 15th century, there is no ancient source that does so.
Greek origin
The short form of the fable as cited by Laura Gibbs is: "There was a dog lying in a manger who did not eat the grain, but who nevertheless prevented the horse from being able to eat anything either."
The story was first glossed in the 1st century CE lexicon of Diogenianus as "The dog in the manger, concerning those who neither themselves use nor allow others to use: Insofar as the dog neither itself eats the barleycorns, nor allows the horse to".<ref>Wolfgang Mieder (2014), [https://books.google.com/books?id=OgAbBwAAQBAJ&q=%22Canis+in+praesepi.+%22G%27%27Behold&pg=PT400 the Proverbs of a People]. University Press of Mississippi, </ref> It was twice used in the following century by Greek writer Lucian: in "Remarks addressed to an illiterate book-fancier" and in his play "Timon the Misanthrope". One other contemporary poetic source is a paederastic epigram by Straton of Sardis in the Greek Anthology.
At roughly the same time, an alternative version of the fable was alluded to in Saying 102 of the apocryphal Gospel of Thomas. This example involves oxen rather than a horse: "Jesus said, 'Woe to the Pharisees, for they are like a dog sleeping in the manger of oxen, for neither does he eat nor does he let the oxen eat'." The saying seems to be similar to his criticism of the Pharisees in the canonical Gospel of Matthew (23.13): "Woe to you, teachers of the law and Pharisees, you hypocrites! You shut the kingdom of heaven in men's faces; you do not enter yourselves, nor will you let others enter."
From Wikipedia (CC BY-SA 4.0).