It existed in the 21st century BC during the reign of Yao and Shun.
The first person to propose the creation of a prison in our country was Gao Tao (gáo yáo). A just judge in Chinese mythology. A clear face and a beak, a selfless face. He had a one-horned sheep (獬豸xiezhi, also known as a unicorn), which could tell who the guilty were. When Gaotao tried cases and encountered problems, he would bring in the sacred sheep, which only touched the guilty.
Gaotao, a native of Gaocheng (now Liu'an, Anhui), was born in the 21st century BC after Shaohao, the son of the Yellow Emperor. He was the founder of the ancient Liu'an Kingdom. According to legend, he was the leader of the Dongyi tribe, with the surname Yan. . Legend has it that Shun was appointed as the official in charge of criminal law. After Yu succeeded to the throne, he recommended Gao Tao as his successor according to the abdication system and "governed him the government" (that is, asked him to handle government affairs). However, Gao Tao died before Yu and did not succeed to the throne. Later Yu recommended Yi as his successor. There is Gao Tao's tomb in the east of today's Liu'an City. The British and Sixth-class countries in the Spring and Autumn Period were the descendants of Gao Tao.
Gaotao, together with Yao, Shun and Yu, is one of the "Four Ancient Sages". He was a judge during the reign of Emperor Shun and was equivalent to the chief justice of the country. Gao Tao was also a great politician, thinker, and educator in ancient times. He is recognized as the "originator of justice" by historians and judicial circles. His thoughts on "rule of law" and "rule of virtue" are closely related to today's "ruling the country according to law" and "ruling the country by law" and "ruling by law". "Ruling the country by virtue" has a historical origin. The judicial activities and legal thoughts in Gaotao culture had an important influence on ancient Chinese legal culture. Gaotao was also mythologically regarded as a prison god by later generations. He assisted Xia Yu in managing politics, controlling floods and developing production, and made great contributions to the integration of Yi and Xia and the subsequent formation of the Chinese nation. Yu appointed Gao Tao as his successor based on his character and merits and granted him government. However, Gaotao died before succeeding to the throne, so Yu granted Ying and Liuyi to his descendants. Emperor Xuanzong of the Tang Dynasty was proud of Gaotao, the ancestor of the Li family, and posthumously named him "Emperor Deming" in the second year of Tianbao (743 AD).
Prisons are the product of the development of human society to a certain historical stage. It came into being with the emergence of classes and the emergence of countries. In the primitive social period before humans entered class society, there were no classes and therefore no prisons. In the clan commune period of primitive society, human society was based on blood relations, people relied on hunting for a living, the means of production were under public ownership, and the leader of the clan was in charge of the distribution of property. However, due to the low level of productivity, it is difficult to ensure people's survival. Since no form of state organization existed, conflicts between peoples were resolved with customary, bloody vengeance. In the late primitive society, due to the development of productivity, people began to form groups and use ground or forged stone tools for hunting, and there was a surplus of products. The clan leaders took possession of the surplus products free of charge, so private ownership emerged in society, and two opposing classes emerged in human society, namely the slave-owning class and the slave class. Human society also transitioned from primitive society to slave society and began to enter the first class society. Along with the emergence of classes, state organizational forms emerged. In order to maintain its rule and suppress the resistance of the ruled class, the ruling class that holds state power has formulated a series of rules and regulations, which are reflected in the will of the state. This is law. Those who violate the law are regarded as crimes, and the offenders must be punished. From this, penalties and prisons emerged.