Huangdi (Yellow Emperor) was the son of Shaodian. His surname was Gongsun, and his prename Xuanyuan. Born a genius he could speak when a baby, as a boy he was quick and smart, as a youth simple and earnest, and when grown up intelligent.
In the time of Xuanyuan, Shennong became enfeebled. The princes made raids on each other and harassed the people, but Shennong could not chastise them, so Xuanyuan exercised himself in the use of weapons of war, so as to be able to punish irregularities.
The princes all came and did homage, but Chiyou (stupid criminal), the fiercest of all, could not be subdued. 'Blazing God'(i.e. Shennong) would oppress the princes, so they turned to Xuanyuan, who practised virtue, marshalled his men, controlled the five elements, cultivated the five kinds of grain, pacified the nations, and went over all parts of his country.
Training black bears, grizzly bears, foxes, panthers, lynxes, and tigers,he with their aid, fought with 'Blazing god' in the desert of Banquan, and, after three battles, realised his wishes.
Chiyou was a rebel, who did not obey the Emperor's command, so Huangdi, levying an army of the princes, fought against Chiyou, captured, and slew him in the desert of Zhulu.
The princes all agreed that Xuanyuan should be the Emperor in place of Shennong, under the title of Huangdi. Those in the empire who would not submit, Huangdi pursude and chastised, and when they were subdued he left them.
He made cuttings in hills, opened roads, and was never at rest. Eastward his empire extended to the sea, Ball hill, and the ancestral Tai Mountain; westward to 'Hollow cave' and Cock's-head hills; southward to the Yangtze river and Xiongxiang hills; while in the north he drove out the Xiongyu. He made a treaty on Kettle hill, and built a city on the slopes of Zhulu.
He was constantly changing his residence, while his troop formed an encampment about him. He ordered his officers to be named after cloud omens. He appointed a chief and deputy superintendent over international affairs, and the various states being at peace, he worshipped the demons and spirits of the hills and streams with the Feng and Chan ceremonies in numbers.
He obtained a valuable tripod, and made calculations of future events, appointing 'Chief of winds', 'Strength-governor',and 'Great Swan', to direct the people to act in accordance with the celestial and terrestrial arrangements, the dark and bright prognostications, the disputations on life and death, the planting of the crops, plants, and trees in their seasons, and the transformations of birds, beasts, insects, and moths.
He also prepared a record of the movements of the sun, moon, and stars; the flow of the tides; and the properties of clay, stones, metals, and gems.
He devoted much careful attention to these things, and his observation was applied to ascertaining how fire, water, wood, and other elements could be used economically.
There was an auspicious omen of earth's energy, and he was therefore called 'Yellow god'. Huangdi had twenty-five sons, of whom fourteen received surnames. He lived at Xuanyuan hill, and married a woman of 'Western range' land called Leizu, who was his principal wife, and bore him two sons, both of whose descendants held Imperial sway.