Tradition held that the conversation recorded in the sutra occurred during the Buddha's lifetime and was translated from the Sanskrit into Chinese by Dharmarakṣa under the Jin at some point between AD266 and 313. More recent scholarship finds that it was a forgery composed in China in the mid-6th century. The subject matter of the Yulanpen Sutra is broadly similar to the stories told about the disciple Sāriputta in the Petavatthu, a Theravadascripture which was responsible for spreading a similar Ghost Festival across South and Southeast Asia. The Petavatthu similarly claimed to be a record of conversations during the Buddha's lifetime and forms part of the Pali Canon but is now thought to date to the 3rdcenturyBC. It may have spread to China indirectly, via Central Asia.
In the sutra, Moggallāna ("Mulian" in Chinese) asks the Buddha about a vision he has had concerning the torment his mother is enduring as a hungry ghost in the afterlife. The Buddha instructs him to make offerings to Buddhist monks and nuns on the 15th day (i.e., the full moon) of the 7th lunar month, which coincided in the 6th century with the end of the monastic community's summer retreat and the beginning of the new Buddhist year. In return for these offerings, the clerics' prayers for the givers' family were supposed to accrue credit to seven generations of ancestors and six degrees of kinship, raising them from their rebirth as animals, hungry ghosts, or denizens in hell.
Bandō, Shōjun, ed. (2005), "The Ullambana Sutra (Taishō Vol. 16, No. 685)", Apocryphal Scriptures(PDF), Bukkyō Dendō Kyōkai English Tripitaka Series, Berkeley: Numata Center for Buddhist Translation and Research, pp. 17–44, ISBN1-886439-29-X.