The Jade Emperor (Yuhuang or Yudi) is the supreme ruler of Heaven in Chinese popular religion and organized Daoism, the sovereign who presides over a celestial bureaucracy modelled on the imperial government of earth. Beneath him a vast hierarchy of gods, officials and functionaries administers the cosmos and the affairs of humankind, keeping records, receiving reports and dispensing reward and punishment much as an imperial civil service would, a divine order that mirrors, and lends sacred sanction to, the structure of the Chinese state itself.
The Jade Emperor's rise to supreme status is unusually well dated for a Chinese folk deity. Song dynasty sources record that in 1008 CE the emperor Zhenzong announced he had received a set of heavenly texts, the Tianshu, direct communications validating his rule, and used the episode to promote the cult of the Jade Emperor at the highest level of state ritual, formally granting the god an elaborate title and building temples in his honour across the empire; modern historians generally read the episode as a calculated piece of political theatre meant to bolster a weak emperor's legitimacy, but it fixed the Jade Emperor's pre-eminence in Chinese religion for the following thousand years. Earlier tradition had instead centred its highest sky-worship on the more abstract Tian, Heaven, and the god Shangdi, of which the Jade Emperor is generally understood as a later, more personalised development.