Yu is mentioned in many ancient books of the Western Zhou period 西周 (11th cent.-770 BCE), like the Classics Shangshu 尚書 and Shijing 詩經. According to the classical poetry collection Chuci 楚辭, Gun 鯀, Yu's father, was the first who attempted to tame the dangerous floods that inundated China. Gun failed and was killed by the Fire God (Huoshen 火神) Zhu Fu 祝蝠 (Zhu Rong 祝融) at Yuxiao 羽郊. Three years after his death, a dragon was born out of his corpse and ascended to Heaven. This was nobody else than Yu (whose character is written with the radical 虫 "worm, dragon").
A story in an apocryphal text called Dunjia kaishan tu 遁甲開山圖 quoted in the book Yishi 繹史 says that at the age of 360 years, Yu flew to Mt. Jiuyi 九嶷 and only came back, when inundations threatened the empire during the reign of Emperor Yao. He reincarnated in the following way: A girl called Di Mu 狄暮 became pregnant after she had swallowed a stone when diving in a river, and gave birth to Yu after 14 months of pregnancy. When Yu had grewn up he took over the task of his father Gun to clear, channel and dyke the rivers. It is also said that Yu was a nineteenth-generation descendant of Nü Wa 女媧, a creatress of the universe.
Yu brought the work his father had begun to a good end by building dykes and dams and digging out canals. He was supported by a dragon called Ying Long 應龍 or Huang Long 黄龍. The book Shizi 尸子 says that when he controlled the Yellow River, the Earl of the River, He Bo 河伯 (He Jing 河精), emerged out of the floods and handed over the River Chart (Hetu 河圖) to Yu, a kind of map of mountains and creeks that helped him channeling the waters.
According to the book Shiyiji 拾遺記, he met the august deity Fu Xi 伏羲 in a cave near the Longmen Gate 龍門 who gave him the Jade Tablets (Yujian 玉簡) that was a kind of trigonometric chart and also helped him to level the rivers. At the Wushan Gorge 巫山 of the Yangtze River, Lady Yunhua 雲華夫人 handed over to him a similarly helpful book, the Shuibaoshu 水寳書, and ordered her servants Geng Chen 庚辰 and Kuang Zhang 狂章 to support Yu in his work. This story is told in the book Yongcheng jixian lu 鏞城集仙錄.
Yu was supported by a yellow dragon (huanglong 黃龍) and a black turtle (xuangui 玄龜). Commentators interprete the former as a kind of dredge, the latter as a dam. Other stories report that he was assisted by Fu Xi and Consort Yao 瑤姬.
During his work, Yu had to fight against a lot of obstreperous demons and deities, like Lord Fangfeng 防風氏 or Gong Gong 共工 and the latter's servant Xiang Liu 相柳, or the water demon Wuzhiqi 無支祁. He took the daughter of the Lord of Tushan 涂山 as his wife, who gave birth to Qi 啓, the real founder of the Xia dynasty.
The book Lüshi chunqiu 呂氏春秋 tells the story that Yu was so preoccupied with his hydraulic works that he even had no time to visit his wife and their children. The history book Guoyu 國語 says that the taming of the floods was the reason why the highest lord or god (shangdi 上帝), or Emperor Shun 舜, bestowed upon Yu the rule over the empire (tianxia 天下 "all under Heaven"). He was also granted the family name (xing 姓) Si 姒, with the tribesname (shi 氏) Xia. He is therefore also called Xia-Yu 夏禹.
When work was accomplished and reported to Emperor Shun, Tai Zhang 太章 and Shu Hai 豎亥 were sent out to survey the earth. Yu is also said to have cast nine tripods (jiu ding 九鼎) that were sent to all provinces.
Yu died during a hunting tour in Guiji 會稽 (modern Zhejiang). His tomb and a temple are still preserved and are located near Shaoxing 紹興, Zhejiang.
Another demigod brought into connection with the taming of floods is Gong Gong, which is probably just another designation of Yu's father Gun. Gong Gong belonged to the family Jiang 姜 from western China, which is probably the same as the Qiang 羌 (or Rong 戎) tribes of historical times. This shows that Gun/Gong and Yu were ancestor deities that originiated in western China, and Yu is therefore sometimes also called Rong Yu 戎禹. He was later elevated to a saint-king of the whole empire. Both deities were later brought into a father-and-son relationship in order to establish a coherent genealogy of all tribal ancestor deities from east (Yao 堯, Shun) and the west (Yellow Emperor 黃帝, Gun, Yu).
During the Warring States period 戰國 (5th cent.-221 BCE), the myth of taming the floods was extended to an organisation of the nine provinces (jiuzhou 九州). Yu visited all provinces of China - that of course do not correspond to the area controlled by the Xia dynasty - , classified the soil and fixed the tributes the provinces had to send to the royal court. The nine provinces were Jizhou 冀州 (approximately modern Shanxi), Yanzhou 沇州 (modern Hebei), Qingzhou 青州 (modern Shandong), Xuzhou 徐州 (modern Suzhou), Yangzhou 揚州 (modern Zhejiang), Jingzhou 荊州 (modern Hubei), Yuzhou 豫州 (modern Hunan), Liangzhou 梁州 (modern Sichuan), and Yongzhou 雍州 (modern Shaanxi).
These activities are described in the chapter Yugong 禹貢 of the Shangshu. In most historiographical sources of that time, Yu is still treated as an ancestor deity or a semi-god, but Confucian and Mohist writers interpreted his figure as that of a ruler reigning with perfect virtue. Emperor Shun therefore did not promise the throne to his son, but abdicated in favour (shanrang 禪讓) to Yu.