The origin of the festival is obscure, but ancestor worship has always been part of Chinese culture. The legend credits the festival to Empeor Wu of the Lisang Dynasty, who in a dream was told to organize ritas to venerate the dead.(Adapted from “Ghosts in High Spirits as Gates as Gates of Hell Open)