China's last imperial eunuch lived until 1996
For some two thousand years Chinese emperors staffed their palaces with eunuchs, trusting that men who could never found a family would never found a dynasty. Some became more powerful than the highest ministers, and one, Zheng He, led great sea voyages. The system ended only in 1924, and its last survivor died in December 1996.
Eunuchs served as civil servants as early as the Qin dynasty and were established at court by around 146 AD under Emperor Huan of Han. The logic behind employing them in senior posts was that, without heirs, they had no reason to seize the throne, and many emperors found them more dependable than scholar-officials. Palace astronomers even named four stars beside the emperor's constellation as his eunuchs, projecting the arrangement onto the heavens.
Castration was also one of the traditional Five Punishments. The historian Sima Qian suffered it on a Han emperor's orders for voicing dissent, and convicts under the Qin were put to forced labour on projects such as the Terracotta Army. Han rulers abolished it as a legal penalty twice, and the first Ming emperor banned it again. Poor families sometimes chose it as a route into imperial employment, and incomplete self-castration became common enough to be outlawed.
Eunuch power could reshape politics. In 189, at the close of the Han, a clique called the Ten Attendants grew so dominant that warlords resolved to remove them; after the eunuchs killed the loyalist He Jin, forces under Yuan Shao stormed the palace, and in the chaos Dong Zhuo took power. Under the Ming, eunuchs came from Korea, Vietnam, Central Asia and Mongolia. Zheng He, a Muslim among captives taken from Yunnan in 1381, went on to serve the Yongle Emperor as a maritime explorer.
Traditional histories cast eunuchs as schemers opposed to virtuous Confucian officials, but historians have questioned that picture. Samuel Finer noted capable eunuch advisers and officials motivated partly by jealousy, while Ray Huang argued that eunuchs embodied the emperor's personal will against the bureaucracy's. By 1912 only 470 remained in imperial service; the institution was abolished on 5 November 1924, and Sun Yaoting, the last of them, died in 1996.
Source: Eunuchs in China