According to the ancient Chinese historian Sima Qian, Yu was the son of Gun, who had been appointed by Emperor Yao to control flooding. Gun failed in his task and was executed by Yao's successor, Emperor Shun, who then appointed Yu to continue the work. Yu succeeded in controlling the floods by dredging rivers and creating canals. As a reward, Shun gave Yu the title of "Lord Yu" (Yu Shi) and married him to his daughter.
After Shun's death, Yu was elected by the leaders of the various tribes of China to become the new emperor. He reigned for 45 years and is credited with establishing a centralized government, dividing China into nine provinces, and promoting agriculture. Yu is also said to have introduced the use of bronze coins and to have set up a system of weights and measures.
Emperor Yu is considered one of the most important figures in Chinese history. He is revered as a hero and a sage and is often compared to the founders of other great civilizations, such as Romulus and Remus of Rome or Moses of the Israelites.