"The Moon is made of green cheese" is a statement referring to a fanciful belief that the Moon is composed of cheese. In its original formulation as a proverb and metaphor for credulity with roots in fable, this refers to the perception of a simpleton who sees a reflection of the Moon in water and mistakes it for a round cheese wheel. It is widespread as a folkloric motif among many of the world's cultures, and the notion has also found its way into children's folklore and modern popular culture.
The phrase "green cheese" in this proverb simply refers to a young cheese (sometimes "cream cheese" is used), though modern people may interpret the color reference literally.
There was never an actual historical popular belief that the Moon is made of green cheese (cf., the myth of the Flat Earth). It was typically used as an example of extreme credulity, a meaning that was clear and commonly understood as early as 1638.
There exists a family of stories in comparative mythology in diverse countries that concern a simpleton who sees a reflection of the Moon and mistakes it for a round cheese:
... the Servian tale where the fox leads the wolf to believe the moon reflection in the water is a cheese and the wolf bursts in the attempt to drink up the water to get at the cheese; the Zulu tale of the hyena that drops the bone to go after the moon reflection in the water; the Gascon tale of the peasant watering his ass on a moonlight night. A cloud obscures the moon, and the peasant, thinking the ass has drunk the moon, kills the beast to recover the moon; the Turkish tale of the Khoja Nasru-'d-Din who thinks the moon has fallen into the well and gets a rope and chain with which to pull it out. In his efforts the rope breaks, and he falls back, but seeing the moon in the sky, praises Allah that the moon is safe; the Scotch tale of the wolf fishing with his tail for the moon reflection;— G. H. McKnight
This folkloric motif is first recorded in literature during the High Middle Ages by the French rabbi Rashi with a Rabbinic parable in his commentary weaving together three Biblical quotations given in the main text (including one on "sour grapes") into a reconstruction of some of the Talmudic Rabbi Meir's supposed three hundred fox fables in the tractate Sanhedrin:
A fox once craftily induced a wolf to go and join the Jews in their Sabbath preparations and share in their festivities. On his appearing in their midst the Jews fell upon him with sticks and beat him. He therefore came back determined to kill the fox. But the latter pleaded: 'It is no fault of mine that you were beaten, but they have a grudge against your father who once helped them in preparing their banquet and then consumed all the choice bits.' 'And was I beaten for the wrong done by my father?' cried the indignant wolf. 'Yes,' replied the fox, 'the fathers have eaten sour grapes and the children's teeth are set on edge. However,' he continued, 'come with me and I will supply you with abundant food. He led him to a well which had a beam across it from either end of which hung a rope with a bucket attached. The fox entered the upper bucket and descended into the well whilst the lower one was drawn up. 'Where are you going?' asked the wolf. The fox, pointing to the cheese-like reflection of the moon, replied: 'Here is plenty of meat and cheese; get into the other bucket and come down at once.' The wolf did so, and as he descended, the fox was drawn up. 'And how am I to get out?' demanded the wolf. 'Ah' said the fox 'the righteous is delivered out of trouble and the wicked cometh in in his stead. Is it not written, Just balances, just weights'?— Rashi
Rashi as the first literary reference may reflect the well-known beast fable tradition of French folklore or a more obscure such tradition in Jewish folklore (see also the tradition in Berechiah ha-Nakdan); the near-contemporary Iraqi rabbi Hai Gaon also reconstructed this Rabbi Meir tale, sharing some elements of Rashi's story, but with a lion caught in a trapping pit rather than a wolf in a well — however, Rashi may have actively "adapted contemporary [French] folklore to the [T]almudic passage", as was homiletically practiced in different Jewish communities. Though the tale itself is probably of non-Jewish European origin, Rashi's form and elements are likely closer to the original in oral folklore than the somewhat later variation recorded featuring Reynard. Rashi's version already includes the fox, the wolf, the well and the Moon that are seen in later versions. Petrus Alphonsi, a Spanish Jewish convert to Christianity, popularized this tale in Europe in his collection Disciplina Clericalis.
The variation featuring Reynard the Fox appeared soon after Petrus Alphonsi in the French classic Le Roman de Renart (as "Renart et Ysengrin dans le puits" in Branch IV); the Moon/cheese element is absent (it is replaced by a promise of Paradise at the bottom of the well), but such a version is alluded to in another part of the collection. This was the first Reynard tale to be adapted into English (as the Middle English "þe Vox and þe Wolf"), preceding Chaucer's "The Nun's Priest's Tale" and the much later work of William Caxton. Later still, the Middle Scots The Fox, the Wolf and the Husbandman does include the Moon/cheese element. The German tale of The Wolf and the Fox in Grimm replaces the well with a well-stocked cellar, where a newly satiated wolf is trapped and subject to the farmer's revenge, being now too overstuffed to escape through the exit.
One of the facets of this morphology is grouped as "The Wolf Dives into the Water for Reflected Cheese" (Type 34) of the Aarne–Thompson classification of folktales, where the Moon's reflection is mistaken for cheese, in the section devoted to tales of The Clever Fox. It can also be grouped as "The Moon in the Well" (Type 1335A), in the section devoted to Stories about a Fool, referring to stories where the simpleton believes the Moon itself is a tangible object in the water.
"The Moon is made of green cheese" was one of the most popular proverbs in 16th and 17th-century English literature, and it was also in use after this time. It likely originated in this formulation in 1546, when The Proverbs of John Heywood claimed "the moon is made of a greene cheese." A common variation at that time was "to make one believe the Moon is made of green cheese" (i.e., to hoax).
In French, there is the proverb "Il veut prendre la lune avec les dents" ("He wants to take the moon with his teeth"), alluded to in Rabelais.
The characterization is also common in stories of gothamites, including the Moonrakers of Wiltshire, who were said to have taken advantage of this trope, and the assumption of their own naivete, to hide their smuggling activities from government officials.
Source: The Moon Is Made Of Green Cheese