The stories of the ancient rulers of China are part of a mythology created by scholars at the end of the last millennium bce. The myth of the three Huang, or the August Ones, and the Di (see Di), the five emperors (Sanhuang Wudi), was the story of a golden age in which there was harmony between gods and rulers. These first eight monarchs were followed by the mythical Xia and the partly historical Yin and Zhou dynasties. From the time of Qinshi Huangdi in the third century ce, Chinese emperors took the title Huangdi, combining, they hoped, the power of the three August Ones and the ancient five emperors, who were thought by some to have been deities on earth. Chinese emperors, therefore, like the Japanese emperors, were, in a sense descended from the gods (see Huangdi). The August Ones were Fuxi, Shennong, and sometimes the wife of Fuxi, Nügua (see Nügua), and sometimes a fire-god named Zhurong or Suiren. Fuxi was the inventor of the trigrams that became the hexograms of the Yijing (see Yijing or I Ching). It is said that Fuxi took the form of a snake. He often is depicted holding a square. His wife Nügua, whose tail is that of a snake, holds a compass. These are symbols of creativity and social order and the fact that the tails of the two figures are usually entwined is indicative of the necessary union of yin and yang (see Yinyang). Shennong is depicted as a plowman, which indicates his association with agriculture. He is also associated with healing.
Of the Five Emperors, the best known is the Yellow Emperor (Huangdi), whose real name was Xianyuan. Like many heroes, the Yellow Emperor was conceived miraculously. His mother, Fubao, received the energy of lightning as she walked in the countryside. The color yellow perhaps signifies a connection with the sun. It was Huangdi who defeated the monster rebel Chiyou (see Chiyou). At the end of his life Huangdi and his entourage were carried up to the gods on a dragon. The Emperor Zhuanxu, or Gaoyang (the Great yang), also defeated a monster rebel, Gonggong (see Gonggong). It was Gaoyang who separated heaven and earth. The Emperor Gu, or Gaoxin, had several wives who are the sources for several royal lines. The Emperor Yao is considered by some Confucians to be the model ruler and the ancestor of the Han dynasty. The Emperor Shun, a pious commoner, underwent several tests of wisdom and morality before succeeding to Yao's kingdom. When he became emperor he defeated the forces representing certain vices that threatened his own royal virtues. The Emperor Yu (see Yu) succeeded Shun and with his father, the demiurge Gun, attempted to stop the great flood (see Chinese Flood). Yu succeeded in ending the flood by digging channels, this signifying the civilizing techniques much admired by the Confucians who contributed to his myth. Yu was the father of the first of the Xia emperors and stands, therefore, at the edge of Chinese history. It was at the end of the Xia dynasty and also at the end of the Yin dynasty that evil emperors effectively ended the golden age.