Huangdi, the Yellow Emperor, is a legendary sovereign and culture-hero of ancient China, counted among the mythical founders of Chinese civilisation and traditionally placed at the head of its history. He is one of the group of primeval sage-rulers, variously reckoned as the Three Sovereigns and Five Emperors, who were held to have raised humanity from a rude state to a civilised one, and an enormous range of foundational inventions and institutions was credited to him and to his reign: the arts of government, the calendar, the compass or south-pointing chariot, medicine, and much else. The Chinese long regarded him as a common ancestor, and to be a descendant of the Yellow Emperor became a way of expressing Chinese identity itself.
The most influential early text to fix Huangdi's place in history is the Shiji, the Records of the Grand Historian, completed around 94 BCE by the court historian Sima Qian, which opens its whole vast chronicle of China with the reign of the Yellow Emperor rather than with the yet more shadowy figures of Fuxi or Nuwa.
Sima Qian, who names him Xuanyuan, treated Huangdi's reign as history's proper starting point precisely because he judged it more securely attested by tradition than the ages before it, a choice that has shaped Chinese historiography's traditional starting point ever since, even though modern scholarship treats Huangdi himself as legendary rather than a verifiable historical ruler.