There are 2 origins to the 7th month Hungry Ghost Festival: The Taoist Origin and Buddhist Origin
Zhong Yuan Jie (中元节) - The Taoist Origin
The Taoist doctrine holds that the three basic elements that generate everything in the universe are heaven, earth and water, namely, "San Yuan(三元)"(three elements), which are also known as "San Guan(三官)" (Three Officials), meaning, the section produced during the flowing process of time and space. They are manifested as the Three Great Official Emperors ( 三官大帝 San Guan Da Di), also known as Officials of Three Realms (三界公 San Jie Gong). Their positions are only second to Great Jade Emperor (玉皇大帝).
Official of Heaven (天官) - Lord Zi Wei (紫微大帝)
The Official of Heaven (天官) named Lord Zi-Wei (紫微大帝) was born on 15th day of 1st Chinese Lunar Month, which is called Shang Yuan Festival(上元节) or Shang Yuan Tian Guang Festival(上元天官节). His Duty is to access the good and bad deeds of heavenly beings and bring blessings to human folks on Earth. Shang Yuan Festival(上元节) is also on the same day as Chinese New Year Lantern Festival (庆元宵).
Earth(地官 - Di Guan) - Lord Qing Xu (清虚大帝)
The Official Of Earth (地官 - Di Guan) named Lord Qingxu (清虚大帝). He was born on 15th day of 7th Chinese Lunar Month, which is called Zhong Yuan Festival (中元节) or Zhong Yuan Di Guan Festival (中元地官节). His duty is to inspect the good and evil deeds of Human Folks on Earth and whether to bring fortune to the worthy person. He may pardon sins on those human folks and those who pass on who did wrong.
Official Of Water(水官 - Sui Guan) - Lord Dong Yin (洞阴大帝)
The Official Of Water(水官 - Sui Guan) named Lord Dongyin (洞阴大帝) was born in 15th Day of 10th Chinese Lunar Month, which is called Xia Yuan Festival (下元节) or Xia Yuan Sui Guan Festival (下元水官节). He is in charge of the matters happening in the nether world, access the good and bad deeds of the spiritual beings waiting for rebirth. His duty also includes dispelling misfortune of human folks on earth.
During these three festivals, the three officials would descend upon earth in their respective festival to execute their duties.
Ulabhama Festival (孟兰盆 节 Yu-Lan-Pen-Jie) - The Buddhist Origin
In the Ullambana Sutra (孟兰盆经), there is a descriptive account of a Buddhist monk named Maudgalyāyana (目犍连), originally a Brahmin youth who later ordained, and later becoming one of the 10 Buddha's chief disciples. Mahāmaudgalyāyana was also known for having clairvoyant powers.
After he attained arhatship, he began to think deeply of his parents, and wondered what happened to them. He used his clairvoyance to see where they were reborn and found his father in the heavenly realms i.e. the realm of the gods. However, his mother had been reborn in a lower realm, known as Avici Hell, or the Realm of Hungry Ghosts. His mother took on the form of a Hungry Ghost (Preta) – so called because it could not eat due to its highly thin and fragile throat in which no food could pass through, yet it was always hungry because it had a fat belly. His mother had been greedy with the money he left her. He had instructed her to kindly host any Buddhist monks that ever came her way, but instead she withheld her kindness and her money. It was for this reason she was reborn in the realm of hungry ghosts.
Maudgalyāyana eased his mother's suffering by receiving the instructions of feeding pretas from the Buddha. The Buddha instructed Maudgalyāyana to place pieces of food on a clean plate, reciting a mantra seven times to bless the food, snap his fingers to call out to the deceased and finally tip the food onto clean ground. By doing so, the preta's hunger would be relieved. Through these merits, his mother was able to be reborn as a dog under the care of a noble family.
Maudgalyāyana then sought the Buddha's advice to help his mother gain a human birth. The Buddha established a day after the traditional summer retreat (the 15th day of the seventh month in the lunar calendar, usually mid-to-late August) on which Maudgalyāyana was to offer food and robes to five hundred bhikkhus. Through the merits created, Maudgalyāyana's mother finally gained a human birth.
Ullambana Festival Festival , the Buddhist version of Hungry Ghost Festival, is the day to
emphasize on filial piety. Monks the Buddhist Folks would recite mantras and prepare vegetarian food offering to the Hungry Ghosts (Pretas) and offer prayers to help them in their rebirth to higher realms.
Ksitigarbha Bodhisattva's Birthy - Last Day of Chinese Ghost Festival
Ksitigarbha Bodhisattva's Birthday, on 30th of Chinese Lunar 7th Month, which also falls on the last day of Chinese Hungry Ghost Festival, therefore during last day of Hungry Ghost Festival, Chinese Folks of both Taoist and Buddhist Faith pay respect and worship him and seek his help to protect and assist their pass-on parents, family members, relatives and ancestors for better rebirth.
Ksitigarbha Bodhisattva (地藏王菩萨) is known for his great vow to help beings in all realms to gain enlightenment before he would become a Buddha. He is also tasked to teach the Dharma to all beings during the time between the passing of Gautama Buddha and the arrival of Maitreya Buddha.
Important Note for Buddhists and Non-Buddhists:
Maudgalyāyana (目犍连) is not Ksitigarbha Bodhisattva (地藏王菩薩).
Maudgalyāyana (目犍连) has often been mistaken to be Ksitigarbha Bodhisattva (地藏王菩薩) , because both were trying to saved their mothers, who were reborn in Hell Realms. The stories may sound similar but they happened at different time and place.
Maudgalyāyana (目犍连) was Gautama Buddha's one of the 10 chief disciples , who attained arhatship. Ksitigarbha Bodhisattva (地藏王菩薩) was a Bodhisattva that Gautama Buddha met and had a dialogue with, that took place in Trāyastriṃśa Heaven, while Gautama Buddha was there to expound the Dharma to his mother, Māyādevī.
Zhong Yuan Festival (中元节) Celebration - The Past and Present
On the 15th of 7th Lunar Month the Taoist Priests would perform rites to honor the Manifestation Anniversary or Inspection Day of The Official Of Earth (地官 - Di Guan) and Salvation Rituals for the Passed-on, in-order to assist them to ascend to the Eastern Palace to enjoy the Eternal Joyous and also, to assist a Good Cultivated Person to attain Enlightenment.
On the same day, the Chinese Folks paid respect to their Ancestors, Passed-on Parents, Masters, Teachers, etc. A Month of Festive Period to pay respect and remember the Wise People of the past, who had Positively Influence oneself. It is also a day to remember the importance of Filial Piety.
These days, Zhong Yuan Festival (中元节)is popularly known as Ghost Festival (鬼节) by the Chinese Folks. Chinese Folks offer prayers to their deceased relatives and other wandering ghosts, such as offer food and drink and burn hell bank notes and other forms of joss paper. A large feast is held for the ghosts on the 15th of the seventh month, when people bring food and place them on an offering table to please the ghosts and ward off bad luck.
In some South East Asian countries today, live performances are held and everyone is invited to attend. The first row of seats are always empty as this is where the ghosts sit. In the past, it used to be Chinese operas but these days, the trend has shifted towards pop Chinese music on a makeshift stage.
Although there are some differences in the rituals and beliefs between Buddhist and Taoist, Chinese will participate in both forms of worship and rituals during this period.
Take Note:
1) Ghosts don't only appear on Chinese Lunar 7th Month. They can be anywhere anytime. They are Earth Bound Ghosts and they usually hide at dark corners, without much human disturbances.
2) Ghosts have no time to harm you or disturb You, unless You have offended them and that they may come to You to seek revenge or Payback. Example: Ask for 4D Numbers from the ghost and forgot to do offerings to the ghost after winning a lot of money.
3) Ghosts might come to disturb or harm You when it is under the command and control of a Taoist Sorcerer or any Black Magician of other faith, for revenge purpose or someone has engaged him to destroy You.
Related Articles:
Hungry Ghost Festivals Celebrated outside Chinese Communities
Chūgen (中元) - Zhong Yuan Festival (Taoist Version) in Japan
In Japan, Chūgen (中元), also Ochūgen (お中元) was originally an annual event for doing offerings to the ancestral spirits. Now, the tradition has changed to giving gifts to their superiors and acquaintances. It is sometimes considered a Zassetsu in the Japanese calendar.
O-bon - Ullambana Festival (Buddhist Version) in Japan
Obon is a shortened form of Ullambana (Japanese: 于蘭盆會 or 盂蘭盆會, urabon'e). O-bon, or simply Bon, is the Japanese version of the Ghost Festival. It has since been transformed over time into a family reunion holiday during which people from the big cities return to their home towns and visit and clean their ancestors' graves. Many Obon celebrations include a huge carnival with rides, games, and summer festival food like watermelon. The festival ends with Toro Nagashi, or the floating of lanterns. Paper lanterns are illuminated and then floated down rivers symbolically signaling the ancestral spirits' return to the world of the dead. This ceremony usually culminates in a fireworks display.
Tết Trung Nguyên - Hungry Ghost Festival in Vietnam
This festival is viewed as the time for the pardoning of condemned souls who are then released from hell. The "homeless" should be "fed" and appeased with offerings of food. Merits for the living are also earned by the release of birds and fish. The lunar month in which the festival takes place is colloquially known as Tháng Cô Hồn - The month of lonely spirits, and believed to be haunted and particularly unlucky. Influenced by Buddhism, this holiday coincides with Vu Lan,the Vietnamese transliteration for Ullambana. In modern times, Vu Lan is also seen as Mother's Day. People with living mothers would bear a red rose and would give thanks while those without, who can choose to bear a white rose; and attend services to pray for the deceased.
Pchum Ben (Khmer: បុណ្យភ្ជុំបិណ្ឌ; "Ancestors' Day") - Hungry Ghost Festival in Cambodia
Pchum Ben is a 15-day Cambodian religious festival, culminating in celebrations on the 15th day of the tenth month in the Khmer calendar, at the end of the Buddhist lent, Vassa. The day is a time when many Cambodians pay their respects to deceased relatives of up to 7 generations.Monks chant the suttas in Pali language overnight (continuously, without sleeping) in prelude to the gates of hell opening, an event that is presumed to occur once a year, and is linked to the cosmology of King Yama originating in the Pali Canon. During the period of the gates of hell being opened, ghosts of the dead (preta) are presumed to be especially active, and thus food-offerings are made to benefit them, some of these ghosts having the opportunity to end their period of purgation, whereas others are imagined to leave hell temporarily, to then return to endure more suffering; without much explanation, relatives who are not in hell (who are in heaven or otherwise reincarnated) are also generally imagined to benefit from the ceremonies.