The founding story of Chinese statecraft is a flood story with an unusual ending. Gun was set to control the waters and tried to dam them, failed, and was executed; his son Yu succeeded by dredging channels and letting the water run to the sea, working for thirteen years and passing his own door three times without going in. For that he received the throne and founded, in the traditional account, the first dynasty. The moral is repeated for three thousand years afterwards: legitimate authority is what can manage water, and a ruler who cannot is one heaven has abandoned.
The river carried gods as well as politics. He Bo, the Earl of the River, received sacrifices in the Warring States period, and the best known story about him is its abolition: the magistrate Ximen Bao, told that a girl was drowned each year as the river god's bride, sent the shamans who organised it into the water to carry his message, and the practice ended. The story circulated as a model of the official who puts an end to a costly cult, and its persistence says as much about later attitudes as about the rite.
The oracle bones of the late Shang, excavated from Anyang in the river valley, record divinations addressed to a river power along with the high god Di and the royal ancestors, so the cult is attested in the earliest Chinese writing there is.