Beginnings
China has the oldest continuously operating legal system in the world. Like everywhere else, until writing was invented, law was necessarily derived from community customs and passed by generation to generation by word of mouth. Also, like anywhere else, some of the legal traditions of ancient China now seem quite ludicrous and founded squarely on superstition. Early Chinese history relates the story of Baron Yü, circa 2,500 BCE, who allegedly divided the realm into a grid with the provision that convicted criminals had to reside on the outer limits. There was widespread human sacrifice and, eventually, a prohibition against interlineal marriage. Chinese society, by custom and tradition, revolved around the family unit, with the oldest male in charge. Ancient Chinese laws reflected that: any person caught scolding his or her elder could suffer the death penalty. The ancient laws even encouraged family members to conceal the crimes of other family members. Correspondingly, the penalty for treason in later-date Chinese legal codes was death not just to the traitor, but also his whole family so the whole lineage of bad apples could be eliminated.
"Legend dates the origin of Chinese law from the dawn of civilization as early as the reign of Emperor Fuxi (r. 2853-2738 BCE). Bronze inscriptions from this period and later chronicles make direct reference to the legal concept of the preceding Xia Dynasty.