A Taoist title of the Black Emperor is the "Dark (or Mysterious) Heavenly Highest Deity" (玄天上帝; Xuántiān Shàngdì). According to a myth, during the fall of the Shang the Demon King ravaged the world, so that Yuanshi Tianzun ordered the Jade Emperor to appoint Heidi as the commander of twelve heavenly legions to fight this evil. Heidi defeated the Demon King and was subsequently granted the title of Mysterious Heavenly Highest Deity. In temples dedicated to him, he has a bronze tortoise and serpent under his feet. This means that the good always prevails over evil.[2]
Festivals
The day for celebration of Heidi across China is his birthday on lunar April 21.
A festival is held on the island of Taipa in Macau. The celebration at the Pak Tai Temple includes an opera-styled performance
Annual Bun Festival in Cheung Chau Island, Hong Kong, held in front of the Pak Tai Temple.