information:extraction
China

In China, castration included removal of the penis as well as the testicles (see emasculation). Both organs were cut off with a knife at the same time.

Eunuchs existed in China from about 4,000 years ago, were imperial servants by 3,000 years ago, and were common as civil servants by the time of the Qin dynasty. From those ancient times until the Sui dynasty, castration was both a traditional punishment (one of the Five Punishments) and a means of gaining employment in the imperial service. Certain eunuchs, such as the Ming dynasty official Zheng He, gained immense power that occasionally superseded that of even the Grand Secretaries. Self-castration was a common practice, although it was not always performed completely, which led to it being made illegal.

It is said that the justification for the employment of eunuchs as high-ranking civil servants was that, since they were incapable of having children, they would not be tempted to seize power and start a dynasty. In many cases, eunuchs were considered more reliable than the scholar-officials. As a symbolic assignment of heavenly authority to the palace system, a constellation of stars was designated as the Emperor's, and, to the west of it, four stars were identified as his "eunuchs."

The tension between eunuchs in the service of the emperor and virtuous Confucian officials is a familiar theme in Chinese history. In his History of Government, Samuel Finer points out that reality was not always that clear-cut. There were instances of very capable eunuchs who were valuable advisers to their emperor, and the resistance of the "virtuous" officials often stemmed from jealousy on their part. Ray Huang argues that in reality, eunuchs represented the personal will of the Emperor, while the officials represented the alternative political will of the bureaucracy. The clash between them would thus have been a clash of ideologies or political agenda.

The number of eunuchs in imperial employ fell to 470 by 1912, when the practice of using them ceased. The last imperial eunuch, Sun Yaoting, died in December 1996.