Segaki is a title of a Buddhist mass. Or it is called Segaki-e.
As it can be read as 'feeding hungry ghosts' in the kun-doku (the word-for-word translating method from Chinese to Japanese), it means the rites to feed living things who fell into Gaki-do (world of hungry ghosts) specially after their death among Bonpu (unenlightened persons) in the worlds of Rokudo rinne (Rebirth in the Six Worlds) and holding a mass for their spirits.
This Buddhist mass is usually held on July 15 (old lunar calendar) as Urabon festival (a Festival of the Dead or Buddhist All Soul's Day, around the 15th of July or August, depending on local customs). In the case of the Obon festival (a Festival of the Dead or Buddhist All Soul's Day) in Japan, each ancestor's spirit called Oshorai-sama is considered to come back to the Buddhist altar in each house once a year so that people place Bonku (offerings) during the Obon period. At the same time, there is a custom to place segakidana (rack for carrying the dead), gakidana (shelf for holding a deceased person) or Shoryoma (conveyance for the spirits of the deceased) for hungry ghosts who are wandering in this world as muen botoke (a person who died leaving nobody to look after his (her) grave).
However, Jodo Shinshu (the True Pure Land Sect of Buddhism) does not hold Segaki-e.
In the Soto sect, it is commonly called Urabon-e Segaki, but the title of 'Segaki-e' was changed to 'Sejiki-e' because the high or the low and lord or loon should not be distinguished between the people who feed and those who are fed.
In addition, Segaki is usually held during the period of Urabon, but fundamentally it should not be held only at a specific time (that is, Urabon). It is said that this has been commonly misconceived because the legends of the honorable priests of Mokuren and Anan (Ananda) were similar (as following).
It is said that Segeki of Mokuren originated from 'Urabon-e-kyo Sutra.'
According to this sutra, when the honorable priest Mokuren, who was one of the Judai deshi (The Ten Chief Disciples of the historical Buddha, Sakyamuni) and called the top of divine power, looked for the whereabouts of his late mother, she became skin and bones in Gaki-do and was going through hell. Mokuren tried to feed his mother by his divine power, but she could neither eat nor drink because not only food but also water were burned out. Mokuren asked Shaka (Sakyamuni) how to relieve her.
Then, Shaka said to him, 'Your mother is highly guilty. She has not done any favors to others and has been so selfish that she fell into Gaki-do.' and 'Prepare something special and recite sutra on July 15 after many priests finish the 90 days ascetic trainings of rainy season, and pray for her from the heart.'
As soon as Mokuren had done this, immediately, Mokuren's mother was relieved from the suffering of hunger. This is considered to be the origin of Urabon (However, it is influential that this sutra is a false sutra created later in China).
On the other hand, Segaki of Anan originates from 'Kubatsu Enku Darani-kyo Sutra' (Dharani for Extinguishing the Flaming Preta's Mouths). When the honorable priest Anan, who was one of the Judai deshi and was called the top ability of Tamon (to hear lots of sutras and to keep good behavior), was practicing meditation at a quite place, a hungry ghost named Enku appeared. He was an ugly hungry ghost who fell away to a shadow and caught fire from the mouth with thin throat, wild hair and shining eyes.
The hungry ghost said to Anan, 'You will die after three days and undergo rebirth as an ugly hungry ghost like me.'
Anan was surprised at that and asked the ghost to avoid such troubles.
It said, 'If you feed all suffering living things in Gaki-do and hold a mass for the 3 treasures of Buddhism: Buddha, sutras and the priesthood, you will take a fresh lease of life and we will escape from suffering as well.'
However, Anan did not have enough money for that, so that he asked Sakyamuni Buddha for help.
Then, Sakyamuni Buddha said, 'There is a secret spell of Kanzeon Bosatsu (the Goddess of Mercy). If you serve food on a dish and perform Kaji (incantation) by reciting this "Kajionjiki Dharani" (literally, incantation for food and drink), the food will become an immeasurable amount of food for all hungry ghosts to feel full enough, and immeasurable sufferings will be relieved, and you can live longer and get a certificate of Buddhism by that good deed.'
As soon as Anan had done this, immediately, he could take a fresh lease of life and was relieved. This is said to be the origin of Segaki.
It is said that these two legends were confused and many temples came to hold Segaki during the period of Urabon.