# Eunuchs in China

A eunuch (/ˈjuːnək/ YOO-nək) is a man who has been castrated. Throughout history, castration often served a specific social function. 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 the Chinese court starting around 146 AD during the reign of Emperor Huan of Han, and were common as civil servants as early as 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 gained immense power that occasionally superseded that of even the Grand Secretaries such as the Ming dynasty official Zheng He. 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, with the eunuch system being abolished on November 5, 1924. The last Imperial eunuch, Sun Yaoting, died in December 1996.

## History
### Qin dynasty

Men sentenced to castration were turned into eunuch slaves of the Qin dynasty state to perform forced labor for projects such as the Terracotta Army. The Qin government confiscated the property and enslaved the families of rapists who received castration as a punishment. Men punished with castration during the Han dynasty were also used as slave labor.

### Han dynasty

In Han dynasty China, castration continued to be used as a punishment for various offenses. Sima Qian, the famous Chinese historian, was castrated by order of the Han Emperor of China for dissent. In another incident multiple people, including a chief scribe and his underlings, were subjected to castration.
During the Han dynasty, the euphemism for castration was "sent to the silkworm house" since castrated men had to be shut in an enclosed room like how silkworms were raised during the castration procedure, and when they were recovering in order to prevent death. Castration as a punishment was known as gōngxíng (宮刑 "palace punishment") or fǔxíng (腐刑 "rotting punishment").
The Han dynasty under the reign of Emperor Wu castrated a prince of the kingdom of Loulan from Xinjiang that they were holding hostage at court because he broke a law. Loulan asked for his return in 92 B.C.E after their king died but the Han dynasty refused since they wanted to cover up the fact that they castrated him.
Zhang He, the older brother of Zhang Anshi was originally sentenced to death but was castrated instead when his brother pleaded for the sentence to be commuted.
The Han dynasty ordered the castration of Li Yannian (musician) as punishment for a crime. Li Yannian's sister Lady Li was a concubine of the Han dynasty emperor.
The Han dynasty ordered the castration of its envoy, Ge Du (Ke Too) because he did not kill the "Mad King" of the Wusun who deserved death in the eyes of the Han dynasty and instead helped the Mad King get doctors to cure his illness.
Su Wen was a eunuch who supported prince Liu Fuling and his mother Lady Zhao against Liu Ju, Crown Prince of Wei and his mother Wei Zifu.
Near the end of the Han dynasty in 189, a group of eunuchs known as the Ten Attendants managed to gain considerable power at the imperial court, so that several warlords decided they had to be eliminated to restore the Emperor's government. However, the loyalist warlord, He Jin, was lured into a trap inside the palace and killed by the eunuchs. The other warlords led by Yuan Shao then stormed the palace and massacred the Ten Attendants and many other eunuchs. In the wake of the fighting, Dong Zhuo seized power.
Castration was abolished twice as a legal punishment in the Han dynasty, the first time prior to 167 B.C. and the second time in the 110s A.D.

### Northern Wei

Category:北魏宦官 (Northern Wei eunuchs)
In 446 an ethnic Qiang rebellion was crushed by the Northern Wei. Wang Yu was an ethnic Qiang eunuch and he may have been castrated during the rebellion since the Northern Wei would castrate the rebel tribe's young elite. Fengyi prefecture's Lirun town according to the Weishu was where Wang Yu was born, Lirun was to Xi'ans's northeast by 100 miles and modern day Chengcheng stands at its site. Wang Yu patronized Buddhism and in 488 had a temple constructed in his birthplace.
The Northern Wei had the young sons of rebels and traitors castrated and made them serve as eunuchs in the palace like Liu Siyi (Liu Ssu-i), Yuwen Zhou (Yü-wen Chou 宇文冑), Duan Ba, Wang Zhi, Liu Teng and Sun Shao. Gao Huan of Northern Qi had Shu Lüè castrated and become a messenger eunuch because his father Fan Guan (Fan Kuan 樊觀) remained loyal to Northern Wei. The Northern Wei presented northern wives to Liu Song generals Cui Mo and Shen Mo. Lingdu, a son was born to Shen Mo's northern wife. However Shen Mo fled back south to Liu Song when he had the opportunity and the Northern Wei castrated Lingdu in response. Cui Mo never went back south so his northern son would not be punished. The rebels themselves and their sons above the age of 14 were executed by chopping at the waist while the sons below 14 were castrated and served in the palace as eunuchs.
The eunuch Zong Ai killed two Northern Wei Emperors and a Northern Wei prince. Empress Dowager Hu mourned for the eunuch Meng Luan.

### Northern Qi

Empress Dowager Hu (Northern Qi) was said to have initially engaged in sexual relations with her eunuchs—although, in light of their being previously castrated, the traditional historians used the term xiexia (褻狎, "immoral games") rather than "adultery" to describe her acts with them.

### Tang dynasty

Indigenous tribals from southern China were used as eunuchs during the Sui and Tang dynasties.
The rebel An Lushan had a Khitan eunuch named Li Zhu'er (李豬兒) (Li Chu-erh) who was working for An Lushan when he was a teenager. An Lushan used a sword to sever his genitals and he almost died, losing multiple pints of blood. An Lushan revived him after smearing ashes on his injury. Li Zhu'er was An Lushan's eunuch after this and was highly used and trusted by him. Li Zhu'er and another two men helped carry the obese An Lushan when he dressed and undressed. Li Zhu'er also helped An Lushan dress at the Huaqing (Hua-ch'ing) steam baths granted by Emperor Xuanzang. Later, An Lushan was stricken with a skin disease and became blind and paranoid. He started flogging and murdering his subordinates, and Li Zhuer was approached by people who wanted to assassinate An Lushan. An Lushan was stabbed in the stomach and disemboweled by Li Zhuer and Yan Zhuang (Yen Chuang) (嚴莊), another conspirator whom An Lushan had previously beaten. An Lushan screamed, "This is a thief of my own household!" as he desperately shook his curtains since he could not find his sword to defend himself.

### Liao dynasty

The Khitans adopted the practice of using eunuchs from the Chinese, and the eunuchs were non-Khitan prisoners of war. When they founded the Liao dynasty, they developed a harem system with concubines and wives and adopted eunuchs as part of it. The Khitans captured Chinese eunuchs at the Jin court when they invaded the Later Jin. Another source was during their war with the Song dynasty. The Khitan Empress Dowager Chengtian led the Khitan to raid China, capture Han Chinese boys as prisoners of war and emasculate them to become eunuchs. The emasculation of captured Chinese boys guaranteed a continuous supply of eunuchs to serve in the Liao Dynasty harem. She personally led her own army and defeated the Song in 986, fighting the retreating Chinese army. The Empress then ordered the castration of around 100 Chinese boys she had captured, supplementing the Khitan's supply of eunuchs to serve at her court, among them was Wang Ji'en (王继恩 (辽朝)). The boys were all under ten years old and were selected for their good looks. Another Han Chinese eunuch who was castrated and captured by the Khitan as a boy was Zhao Anren (赵安仁) The Han Chinese boys captured and castrated by Empress Chengtian became domestic slaves in the Liao palace and did not gain political power. Khitan women, especially empresses and imperial concubines actively fought in war on the battlefield.
The Liao enacted a new ling (ordinance) on castration, when an yila (i-la) (footsoldier) named Tuli (T'u-li)'s underage daughter was raped by an Imperial consort clan uncle, lang jun (lang-chün) Xiao Yan's (Hsiao Yen)'s slave Haili (Hai-li) in 962 when Emperor Muzong of Liao was reigning. Haili was made a slave to Tuli after being castrated. Boys were not executed but instead castrated if they were under 16 during the Qing and Liao dynasties as punishment during rebellions.

### Jin dynasty

Eunuchs in the Jin dynasty were domestic slaves who served the women of the palace like the concubines and empresses and did not gain political power. Liang Chong 梁珫 was a eunuch in the Jin dynasty. Song Gui (宋珪) was another eunuch in the Jin dynasty.

### Yuan dynasty

As with all parts of the Mongol Empire, Goryeo (Korea) provided eunuchs to the Mongols. One of them was Bak Bulhwa, who caused harm to Goryeo. Other Korean eunuchs in the Yuan included Go Yongbo and Bang Sin-u. Some Chinese and Korean eunuchs adopted Mongol names.

### Ming dynasty

Castration as a legal punishment was banned at the end of the reign of the first Ming emperor, Ming Taizu.
Huai'en (died in 1488) was originally surnamed Dai (戴) and born in Shandong's Gaomi city. He was forced to become a eunuch and was castrated as a young boy because his father and other members of the Dai family who worked as government officials were accused of crimes so he was punished as well.
There were eunuchs from China's various ethnic tribes, Mongolia, Korea, Vietnam, Cambodia, Central Asia, Thailand, and Okinawa.$^{:14–16}$
There were Korean, Jurchen, Mongol, Central Asian, and Vietnamese eunuchs under the Yongle Emperor,$^{:36ff}$ including Mongol eunuchs who served him while he was the Prince of Yan. Muslim and Mongol eunuchs were present in the Ming court,$^{:14}$ such as the ones captured from Mongol-controlled Yunnan in 1381, and among them was the great Ming maritime explorer Zheng He,$^{:14ff}$ who served Yongle. Muslim eunuchs were sent as ambassadors to the Timurids. Vietnamese eunuchs like Ruan Lang, Ruan An (Nguyễn An), Fan Hong, Chen Wu, and Wang Jin were sent by Zhang Fu to the Ming.
During Ming's early contentious relations with Joseon, when there were disputes such as competition for influence over the Jurchens in Manchuria, Korean officials were even flogged by Korean-born Ming eunuch ambassadors when their demands were not met. Some of the ambassadors were arrogant, such as Sin Kwi-saeng who, in 1398, got drunk and brandished a knife at a dinner in the presence of the king. Sino-Korean relations later became amiable, and Korean envoys' seating arrangement in the Ming court was always the highest among the tributaries. Korea stopped sending human tribute after 1435. A total of 198 eunuchs were sent from Korea to Ming. The Ming eunuch hats were similar to the Korean royal hats, indicating the foreign origins of the Ming eunuchs, many of whom came from Southeast Asia and Korea. Yishiha was a Jurchen eunuch in the Ming dynasty during the Yongle emperor's period and Jurchen women were also concubines of the Ming Yongle emperor.
By the late Ming, nearly 80 percent of eunuchs came from North China, mainly the Beijing area. They came from a few counties around Beijing like Hejian.
During the Miao Rebellions, the Ming Governor castrated thousands of Miao boys when their tribes revolted, and then gave them as slaves to various officials. The Governor who ordered the castration of the Miao was reprimanded and condemned by the Ming Tianshun Emperor for doing it once the Ming government heard of the event.$^{:16}$
Zhu Shuang (Prince of Qin), while he was high on drugs, had some Tibetan boys castrated, and Tibetan women seized after a war against minority Tibetan peoples. As a result, he was denounced after he died from an overdose.
On 30 January 1406, the Yongle Emperor expressed horror when the Ryukyuans castrated some of their own children to give them to the emperor. The Yongle Emperor said that the boys who were castrated were innocent and did not deserve castration, and he returned the boys to Ryukyu and instructed them not to send eunuchs again.
In the Lê Dynasty the Vietnamese Emperor Lê Thánh Tông was aggressive in his relations with foreign countries including China and cracked down on foreign contacts and enforced an isolationist policy. A large amount of trade between Guangdong (Leizhou Peninsula and Hainan) and Vietnam happened during this time. Early accounts recorded that the Vietnamese captured Chinese whose ships had blown off course and detained them. Young Chinese men were selected by the Vietnamese for castration to become eunuch slaves to the Vietnamese. It has been speculated by modern historians that Chinese who were captured and castrated by the Vietnamese were involved in regular trade between China and Vietnam instead of being blown off course, and that they were punished after a Vietnamese crackdown on trade with foreign countries.
Several Malay envoys from the Malacca sultanate were attacked and captured in 1469 by Vietnamese navy as they were returning to Malacca from China. The Vietnamese enslaved and castrated the young from among the captured.
A 1499 entry in the Ming Shilu recorded that thirteen Chinese men from Wenchang including a young man named Wu Rui were captured by the Vietnamese after their ship was blown off course while traveling from Hainan to Guangdong's Qin subprefecture (Qinzhou), after which they ended up near the coast of Vietnam, in the 1460s, during the Chenghua Emperor's rule (1464–1487). Twelve of them were enslaved to work as agricultural laborers, while the youngest Chinese man, Wu Rui (吳瑞) was selected by the Vietnamese court for castration since he was the only young man in among the thirteen and he became a eunuch at the Vietnamese imperial palace in Thang Long for nearly one fourth of a century. After years of serving the Vietnamese as a eunuch slave in the palace, he was promoted to a position with real power after the death of the Vietnamese ruler in 1497 to a military position in northern Vietnam as military superintendent since his service in the palace was apparently valued by the Vietnamese. However the Lạng Sơn guard soldier Dương Tam tri (Yang Sanzhi) told him of an escape route back to China and Wu Rui escaped to Longzhou after walking for 9 days through the mountains. The local ethnic minority Tusi chief Wei Chen took him into custody, overruling objections from his family who wanted to send him back to Vietnam. Vietnam found out about his escape and sent an agent to buy Wu Rui back from Wei Chen with 100 Jin in payment since they were scared that Wu Rui would reveal Vietnamese state secrets to China. Wei Chen planned to sell him back to the Vietnamese but told them the amount they were offering was too little and demanded more however before they could agree on a price, Wu was rescued by the Pingxiang magistrate Li Guangning and then was sent to Beijing to work as a eunuch in the Ming palace at the Directorate of Ceremonial (silijian taijian 司禮監太監). The Đại Việt sử ký toàn thư records that in 1467 in An Bang province of Dai Viet (now Quảng Ninh Province) a Chinese ship blew off course onto the shore. The Chinese were detained and not allowed to return to China as ordered by Le Thanh Tong.
A 1472 entry in the Ming Shilu reported that some Chinese from Nanhai escaped back to China after their ship had been blown off course into Vietnam, where they had been forced to serve as soldiers in Vietnam's military. The escapees also reported that they found out that more than 100 Chinese men remained captives in Vietnam after they were caught and castrated by the Vietnamese after their ships were blown off course into Vietnam in other incidents. The Chinese Ministry of Revenue responded by ordering Chinese civilians and soldiers to stop going abroad to foreign countries. These 100 men were taken prisoner around the same time as Wu Rui and the historian Leo K. Shin believes all of them may have been involved in illegal trade instead of being blown off course by wind. The over 100 Chinese men who were castrated and made into eunuchs by the Vietnamese remained captives in Vietnam when the incident was reported. Both the incidents of the young Chinese man Wu Rui and the more than 100 Chinese men being castrated and used as eunuchs point to possible involvement in trade according to historians John K. Whitmore and Tana Li which was then suppressed by the Vietnamese government instead of them really being blown off course by the wind. China's relations with Vietnam during this period were marked by the punishment of prisoners by castration.
An anti-pig slaughter edict led to speculation that the Ming Zhengde Emperor adopted Islam due to his use of Muslim eunuchs who commissioned the production of porcelain with Persian and Arabic inscriptions in white and blue color. Muslim eunuchs contributed money in 1496 to repairing Niujie Mosque. It is unknown who really was behind the anti-pig slaughter edict.
At the end of the Ming dynasty, there were about 70,000 eunuchs (huànguān or tàijiàn) employed by the emperor with some serving inside the imperial palace. There were 100,000 eunuchs at the height of their numbers during the Ming.$^{:34ff}$ In popular culture texts such as Zhang Yingyu's The Book of Swindles (c. 1617), eunuchs were often portrayed in starkly negative terms as enriching themselves through excessive taxation and indulging in cannibalism and debauched sexual practices.
The Southern Ming Yongli emperor's wife Empress Wang (Southern Ming) had a boy eunuch slave who later wrote his autobiographical account "Yangjian biji". He was from Huguang province's Jingzhou prefecture. Rebels killed his parents and he was adopted by Liu, one of the rebels. Liu became a Southern Ming soldier. The Southern Ming court needed eunuchs so they ordered high-ranking military officers to give up their older than 7 year old sons to be castrated in Kunming (Yunnan Fu) for the Yongli court in 1656. Over 20 boys were castrated 1 month after the order despite Liu's attempts to save his adopted son from the castration.
Wang Ruoshue (Joseph) and Pang Tianshou (Achilles) were eunuchs at the Southern Ming Yongli emperor's court, and they along with Crown Prince Zhu Cixuan (朱慈煊) (Constantine), Empress Dowager Wang (Southern Ming) (Helena), Empress Dowager Ma (Southern Ming) (Maria), Empress Wang (Southern Ming) (Anne) and Qu Shisi (瞿式耜) (Ch'ü Shih-ssu), the Guangxi provincial governor, were all baptized as Roman Catholics by Jesuits Andreas Wolfgang Koffler and Michał Boym. A novel was written about them by Robert Elegant. Other Southern Ming eunuchs included Gao Qiqian (高起潛) and Lu Jiude (盧九德).

#### Path to the occupation

In Ming China, the royal palace acquired eunuchs from both domestic and foreign sources.$^{:126–138}$ On the one hand, the eunuchs in Ming China came from foreign sources. The enemies of Ming China were castrated as a means of punishment when they are captured by the Ming army as prisoners.$^{:127}$ For example, the population of Mongol eunuchs in Nanjing increased significantly during Yongle's reign when there was a war between Ming China and the Mongols.$^{:127}$ The foreign eunuchs also came as tribute from many small countries around China.$^{:127}$ On the other hand, eunuchs also came from indigenous Chinese. In Ming China, many men castrated themselves to be hired in the palace, when the only way for these men to enter into a life of privilege was through eunuchism.$^{:128}$ Besides the royal palace, bureaucratic elites, such as mandarin officials, also hired eunuchs to be servants in their families.$^{:131}$ With this demand, many men were willing to castrate themselves to become eunuchs.

#### Daily functions of normal eunuchs

Eunuchs in Ming China also played a critical role in the operation of the imperial palace. Their responsibilities varied in significance with jobs that included almost every aspect of everyday routine in the imperial palace. Some of their responsibilities were procuring copper, tin, wood, and iron. Also, they had to repair and construct ponds, castle gates, and palaces in major cities like Beijing and Nanjing, and the mansions and mausolea in the living spaces of imperial relatives.$^{:131}$ They prepared meals for a great number of people in the palace. Taking care of the animals in the palace was another one of their jobs. In a word, the eunuchs' work was the cornerstone of the palace's daily operation, and they were responsible for the Emperor and his relatives' comfortable life.$^{:125}$

#### Relationship with other occupations in the royal palace

The eunuchs were also highly associated with other lower ranking occupations in the royal palace. For example, some eunuchs would have special relationships with serving women in the palace. Some eunuchs would form a partnership with serving women to support each other, which was called a "vegetarian couple" (Duishi).$^{:43}$ In this kind of relationship, both the eunuchs and serving women could be more secure when they encountered conflicts with those of higher rank such as mandarin bureaucrats.$^{:60}$

#### Power of eunuchs in the palace

The eunuchs also had an opportunity to rise to higher ranks. For example, the duties and jobs of eunuchs gradually changed in Ming dynasty. In the Hongwu Emperor's time, the Emperor decreed that the eunuchs were to be kept in small numbers and of minimal literacy to prevent them from seizing power.$^{:64}$ However, in later generations, the Emperors began to train and educate the eunuchs and made them their personal secretaries.$^{:65}$ The lack of the restrictions allowed some eunuchs to rise to great power, for example, Wang Zhen, Liu Jin, and Wei Zhongxian especially. There was even a eunuch supervised secret police, which worked for the emperor. It was known as the Eastern Depot and Western Depot.$^{:65}$ Also, Zheng He, a famous eunuch in China's history, became an early pioneer of seafaring and spread Chinese influence around the world.

#### Reputation of eunuchs in China

However, the reputation of eunuchs was controversial in Ming China, especially considering the way they had their eyes and ears everywhere. Since the eunuchs served both the harem and the emperors, it was believed that they were able to carry valuable information that could either break or create an emperor's status, so out of fear, Chinese bureaucrat-scholars always depicted eunuchs negatively as greedy, evil, cunning, and duplicitous.$^{:121}$ The Chinese seemed to have a stereotypical view toward the eunuchs. This bad reputation may be explained by the fact that the eunuchs, to get employment in the royal palace or official houses, needed to be castrated. Castration gave the eunuchs the license to work in the palace or official houses in Ming China because the officials and the Emperor in Ming China usually kept many concubines.$^{:133}$ However, in Chinese society, castration broke with conventional moral rules. A son who could not have a male heir to carry on the family name contradicted Confucian ideology.$^{:132}$ The eunuchs, despite their awareness of losing the ability to have children, would get castrated to have better lives. Another stereotypical view of eunuchs in the palace was that they exceeded their power in areas they did not belong, or that they did unpleasant work. For example, they were spies for emperors or officials. The Yongle Emperor gave the eunuchs the authority to be in charge in the implementation of political tasks. As the eunuchs' presence and power grew, they gradually took over the duties of female palace musicians and become the dominant musicians in the Ming palace. When they came to power, eunuchs would even interfere in politics such as the succession to the throne.$^{:125}$

### Qing dynasty

Qing eunuchs had their testicles, scrotum and penises removed.
Many Qing eunuchs were Mongol and Manchu origin despite laws against Manchus becoming eunuchs.
While eunuchs were employed in all Chinese dynasties, their number decreased significantly under the Qing, and the tasks they performed were largely replaced by the Imperial Household Department. At the beginning of the 20th century, there were about 2,000 eunuchs working in the Forbidden City. The eunuchs at the Forbidden City during the later Qing period were infamous for their corruption, stealing as much as they could. The position of a eunuch in the Forbidden City offered opportunity for theft and corruption. China was such a poor country that countless men willingly became eunuchs to live a better life. However, eunuchs as the Emperor's slaves had no rights and could be abused at the Emperor's whim. The Emperor Puyi recalled in his memoirs of growing up in the Forbidden City that: "By the age of 11, flogging eunuchs was part of my daily routine. My cruelty and love of power were already too firmly set for persuasion to have any effect on me... Whenever I was in a bad temper the eunuchs would be in for trouble."
The Qing beile (princes) were told that their palace women would have sex with their boys slaves so they were told to have the young boy slaves castrated by Nurhaci in 1621.
The Imperial Household Department managed eunuchs since the Kangxi reign. The Qing palace leaned towards recruiting eunuchs from Zhili, mainly mid 20 year olds or adolescent Han Chinese who were not married, mainly from northern Shandong and the counties of Wanping, Jinghai, Daxing and Hejian in southern Hebei near Beijing. Some southern Chinese from Yunnan, Zhejiang and Guangdong people became eunuchs but in a minor amount compared to the counties around Beijing.
Sons of rebels 15 and younger from the Lin Shuangwen rebellion in Taiwan were castrated as ordered by the Qianlong emperor and Heshen. The Taiwanese boys who were castrated were aged 4 to 15 years old and 40 of them were named on one memorial. This new policy of castrating sons of killers of 3 or more related people and rebels helped solve the supply of young eunuchs for the Qing Summer Palace. The Qing were willing to lower their normal age limit for castration all the way to 4 when using castration as punishment for sons of rebels when it normally wanted eunuchs castrated after 9. Other times, the Qing Imperial Household Department waited until the boys reached 11 years old before castrating them, like when they waited for the two young imprisoned sons of executed murderer Sui Bilong from Shandong to grow up. The Imperial Household Department immediately castrated the 11-year-old Hunanese boy Fang Mingzai to become a eunuch slave in the Qing palace after his father was executed for murder. The Qing Summer palace, due to this policy of castrating sons of mass murderers and rebels received many young healthy eunuchs. Sons of rebels leaders above 15 were beheaded. Female relatives of Taiwanese rebel leaders (daughters, wives, concubines) were sent to the northeastern frontier in Ningguta in Heilongjiang to become slaves of the Solon. 130 sons of the Taiwanese rebel leaders 15 and younger were taken into custody by the Qing. The rebel leader Zhuang Datian's 4-year-old grandson Zhuang Amo was one of those castrated. There was another Lin family who joined the Lin Shuangwen rebellion. Lin Da was ordered to lead 100 people by Lin Shuangwen and given the title "general Xuanlue". Lin Da was 42 when he was executed by Lingchi. He had six sons; the two older ones died before, and his third son Lin Dou died from sickness before he could be castrated in Beijing, while his fourth and fifth sons were castrated, the 11-year-old Lin Biao and 8-year-old Lin Xian. However, his sixth and youngest son, 7-year-old Lin Mading, was given away to a relative (uncle) named Lin Qin for adoption, and Lin Qin did not join the rebellion, so Lin Mading was not castrated. Lin Mading had 2 children after marrying his wife in 1800 when he was 20.
Descriptions of fingerprints were recorded for castrated sons of criminals and rebels, but it was barely used for other eunuchs when trying to find escapee eunuchs and only a written description of the fingerprints was taken, not an actual print. Fingerprints were used in the Qing bureaucracy in other instances to identify people. Sometimes castrations were not fully done since an undescended testicle would not be removed and it was only found out when puberty brought out the "secondary sex characteristics". If they were found out then they would be sent back to their hometowns and out of the palace. They would still be called eunuchs.
In one case reviewed by the Qianlong emperor, a man named Zhao Youliang (赵友谅) was innocent of all crime but his father Zhao Cheng (赵成) slept with his son's wife. Zhao Youliang didn't want to report his father out of filial piety so he took his wife elsewhere to their relatives, the Niu (牛) family's house to hide her from his father Zhao Cheng. Sun Si (孙四), a friend of Zhao Cheng then helped Zhao Cheng murder 5 members of the Niu family, and then Zhao Cheng blamed his son Zhao Youliang for the murder. Zhao Youliang did not implicate his father out of filial piety when he was being tortured in interrogation but the officials realized one person couldn't have killed 5 the government officials tortured and interrogated the neighbors until they revealed that Sun Si and Zhao Cheng committed the murder. The penalty for mass murdering multiple people was that the same number of people from the perpetrator's family would get executed. The officials did not want to execute Zhao Youliang for his father's crimes so they asked the Qianlong emperor to decide. Qianlong decided that the son was to be sentenced to castration since he deserved death under Qing law because he was the son of a murderer but "commuted" his sentence to castration as mercy because he was personally victimized when his father who slept with his wife, and he had filial piety and said he had to be castrated because his father did not deserve offspring.
There was also a mass murder incident where a murderer injured 12 and murdered 11 unrelated people in 1791. The Qing law on mass murdering said that castration was to be done on sons of murderers who mass murdered against one family and killed 3 or more members of it, but nevertheless the Qing emperor ordered the sons of this mass murderer be castrated as well. After one boy was injured severely and his three brothers were killed in Henan by a murderer surnamed Zhang who was a tenant farmer in 1788, the emperor ordered castration for the 2 sons of Zhang while a lingchi sentenced was passed for Zhang himself.
The Qing passed a law that castration was the punishment for grandsons and sons of rebels by the Imperial Household Department after changing a death sentence to a castration sentence in the case of an 18 year old who was a nephew of a rebel in 1781, however despite the law being inspired by this case, nephews weren't covered in the people to be castrated in the law and only the direct sons and grandsons of the rebels were. Qianlong reintroduced castration of relatives of those who murdered multiple people or rebelled. The Ming code and Tang code both do not have such a law. Castration for sons of rebels was reintroduced in by the Qing in the 18th century after it was abolished in the Ming and Tang dynasties. Sons of murderers above 15 were not beheaded unlike sons and grandsons of rebels and instead they were also castrated as eunuchs in the palace. The wives and daughters of murderers would be given to the murder victims' relatives if they still lived unlike wives and daughters of rebels. Qianlong and the Imperial Household Department under Heshen later decreed that sons of murderers who were 16 years old and older would be exiled as become slaves of the Solon on the frontier in Ningguta in Heilongjiang or Ili in Xinjiang after castration while the sons 15 and younger would be kept as eunuchs in the Imperial palace since the younger sons could be controlled while the older sons were uncontrollable in a decision made in 1793. Imposing a penalty of castration upon the sons of rebels and murderers of 3 or more related people was part of a new Qing policy to ensure a supply of young boy eunuchs since the Qianlong emperor ordered young eunuchs to be shifted towards the main imperial residence in the Summer Palace. Norman A. Kutcher connected the Qing policy on obtaining young eunuchs to the observation that young boy eunuchs were prized by female members of the Qing Imperial family as attendants, noted by the British George Carter Stent in the 19th century. Norman Kutcher noted that George Stent said young eunuchs were physically attractive and were used for "impossible to describe" duties by female imperial family members and they were considered "completely pure". Kutcher suggests the boys were used for sexual pleasure by Qing imperial women, connecting them to the boy eunuchs called "earrings" who were used for that purpose. Boy eunuchs were used for intimate bathroom and bedroom duties by palace ladies.
An amusement part model peasant village with a complete market street (Maimaijie) in the Summer palace was staffed by eunuch actors.
Sir John Barrow, 1st Baronet noted on his visit to the Qing summer palace as part of the Macartney Embassy in 1793 that there were two kinds of Chinese eunuchs. Some only had their testicles cut off, who inspected and maintained buildings, gardens and other works in the palaces. The others were called rasibus by Catholic missionaries there and had all their genitals, including penises and testicles cut off, since they served in the interior of the palace and served and attended upon the women of the Qing imperial harem. The rasibus were reportedly as coquettish as the women they served, and painted their faces like them. Barrow also noted all the Chinese eunuchs there including the rasibus had their own women slaves who were the daughters of poor people they purchased them from and they used these women for sex.
Sir George Staunton, 1st Baronet explained that the term "black eunuch" did not refer to skin colour but referred to the term used in the Ottoman Empire for eunuchs who had their penis cut off along with their testicles.
During the Qing, Chinese eunuchs who were fully castrated with their penises removed had to resort to either dildos, oral sex or foreplay to satisfy women during sex. Qing era writer Liang Zhangju (1775–1849) wrote in his sketches "Wandering Talk" that when palace eunuchs performed oral sex on the women and caressed them with their hands until the women were sexually satisfied and sweating.
Chinese eunuchs used dildos and hormone therapy to have a "dry-run orgasm with diminished sensation", and they could "to reduce the effects of castration" especially if they were past puberty when castrated. Eunuchs still had sexual urges after castration as well as libido. The eunuchs were sexually "frustrated". The eunuch Zhang Delang engaged in sexual acts with a prostitute in Tianjin's Japanese concession where he lived after the fall of the Qing and he also married three women. Another eunuch who worked for him, Yu Chunhe said he was "burning with fever and desire" as he watched the prostitute and Zhang. The Qing court and the eunuchs themselves considered eunuchs as male, not as female or a third sex. The prostitute's body was kissed all over by Zhang Lande as he lifted her and "threw himself on her like a wolf". It was also reported that the eunuch Xiao Dezhang (Hsiao Teh-chang) (Zhang Lande) was suggested by Cixi (Tsu-hsi) as a sexual partner for the Longyu empress (Lung-yu) since the Guangxi emperor (Kuang Hsu) was impotent. Zhang Lande had the building later known as Qingwangfu (Prince Qing's Mansion) in Tianjin built for himself before Zaizhen, Prince Qing bought it from him. The eunuch Zhang Lande had a love affair with Han Bannerwoman Yu Roung Ling, a sister of Princess Der Ling.
The Manchu palace maid Ronger (榮兒) (born 1880) came from the Manchu Hešeri clan. She later adopted the surname He and became known as "He Rong'er". When Ronger turned 18 and retired as a palace maid, the Qing Dowager Empress Cixi married Ronger off to a Han Chinese eunuch surnamed Liu as a present to her. Liu was an adopted son of the eunuch Li Lianying. Ronger recounted in her memoir that the Qing court rules were that all eunuchs must be Han Chinese not from the Eight banners, while all palace maids must be Manchu bannerwomen from the three upper banners of the Eight Banners and Han Chinese girls were forbidden to become palace maids. For 8 years Cixi had Ronger serving her as maid and Cixi gave her the name Ronger. She was 13 when she was recruited at palace maid during mandatory recruitment drives from the banners. She wrote the book "The Memoirs of a Palace Maid" about her life. The rules had been changed to recruit mainly Manchu and Mongol banner girls for palace maids and ban Han banner girls from palace made work in 1806, ostensibly and officially to help Han bannermen reduce their monetary burdens but the historian Shuo Wang also believes it was due to the fact that Han banner girls followed Han customs and not Manchu ones. Any Han bannerman who was not a high official and not of the 6th rank did not have to send his daughters to the palace maid draft while every Manchu and Mongol bannerman had to send their daughters. The "servant girls" were "daughters of Manchu soldiers" and had to "stay ten years at the palace to wait upon Her Majesty, and then they are free to marry".
When George N. Kates lived in Beijing in the 1930s, he lived in a dwelling he rented from a eunuch and his wife, who were given the abode by the Empress Dowager as a gift and the eunuch's wife was a former handmaiden to the Empress Dowager. During the Great Leap Forward, malnutrition caused the wife of the eunuch to die.
Sexual relations and marriage between eunuchs and palace maids were referred to as "Duishi" or "Caihu".
Ma Saihua, a 19-year-old woman was married by the eunuch An Dehai when he was 24.
A yellow bag with bamboo sticks was kept in the Forbidden City and Empress Dowager Cixi once ordered the palace servant girls and court ladies to beat the eunuchs with them. Eunuchs would be punished even more unless they begged their mistress or master for mercy when they were being beaten for infractions and rule breaking. There was a difference between eunuchs who served the inner court of the palace and the outer court of the palace. There were fewer rules and restrictions on outer court eunuchs and they dwelled outside the palace and received less salary. They were the musicians, actors, taking care of the tombs and served as the Imperial Household Department's zongguan and maintained temples, altars, parks and gardens, belonging to 5 different sections. They were subject to the Jingshifang and did mostly menial work. The eunuchs of the inner court were higher in rank and received more salary. Out of the total eunuch population, one fifth to one fourth were from the inner court and they numbered 400 to 500. The inner court eunuchs were of 5 categories, those in the general service, those who serves princesses and princes, those who served the dowager empress, those who served the concubines and empress, and those who served the emperor.
The film "The Conqueror" (征服者) starring actress Chen Hong depicts the castration of the 8–15 year old sons of rebels in the White Lotus Rebellion in 1804.
Zhang Wenxiang (張汶祥) who was accused in the assassination case of Ma Xinyi was executed and his 11-year-old son Zhang Changpao (張長幅) was castrated by the Imperial Household Department to become a eunuch. His son was first tortured in front of him to get him to confess to the assassination which many believed was an inside conspiracy by the Qing government against Ma Xinyi. Zhang Wenxiang's daughter was already married so she was not enslaved by the government.
Taiping rebel Shi Dakai's had 2 sons, 5 year old Shi Dingzhong and a younger son named Shi Dingji. His sons were sentenced to imprisonment until they reached 11 when they would then be castrated. It is unknown if it was carried out.
When the Qing forces under Zuo Zongtang put down the Dungan Revolt (1862–1877), the sons of Muslim Hui and Salar rebel leaders like Ma Benyuan (马本源) and Ma Guiyuan (马桂源) in Ningxia, Gansu and Qinghai were castrated by the Qing Imperial Household Department once they became 11 years old and were sent to work as eunuch slaves for Qing garrisons in Xinjiang and the wives of the Muslim rebel leaders were also enslaved. Ma Jincheng, a son of the Hui Naqshbandi leader Ma Hualong was also castrated after being held in jail in Xi'an until he was 11 years old. The Imperial Household Department immediately castrated the 9 sons of Ma Guiyuan since they already reached age 12 and were enslave as eunuchs to Qing soldiers in Xinjiang. Ma Zhenyuan, Ma Benyuan and Ma Guiyuan's wives were all enslaved to soldiers and officials in provincial garrisons after the husbands were executed. Ma Yulong was the father of the boys Ma Sanhe and Ma Jibang. Ma Dingbang was the father of Ma Qishi, Ma Shaba, Ma Suo and Ma Youzong. Ma Chenglong was the father of Ma Feifei. Their sons were all sentenced to castration.
The sons and grandsons of the Central Asian Muslim conqueror, Yaqub Beg, in China were all castrated. Surviving members of Yaqub Beg's family included 4 sons, 4 grandchildren (2 grandsons and 2 granddaughters), and 4 wives. They either mostly died in prison in Lanzhou, Gansu, or were killed. However, his sons, Yima Kuli, K'ati Kuli, Maiti Kuli, and grandson, Aisan Ahung, were the only survivors in 1879. They were all underage children, and put on trial, sentenced to an agonizing death if they were complicit in their father's rebellious "sedition", or if they were innocent of their fathers' crimes, were to be sentenced to castration and serve as eunuch slaves to Chinese troops, when they reached 11 years old. They were handed over to the Imperial Household to be executed or castrated. In 1879, it was confirmed that the sentence of castration was carried out; Yaqub Beg's son and grandsons were castrated by the Chinese court in 1879 and turned into eunuchs to work in the Imperial Palace. Yaqub Beg's sons and grandsons who were captured were under 10 years old Aisin Ahongju, Kadihuli and 10 year old Imahuli . A man in Shaanxi had his penis cut off by his daughter in law, surnamed Xie during the Qing dynasty
In 1872 boy named Liu Ch'ang-yu from Henan was taken by the Imperial Household Department for castration when he grew of age to be enslaved as a eunuch in a princely establishment since his father had murdered several relatives.
In 1856, some rebels were captured in the metropolitan province (Zhili) and several boys under 15 years old were with them. The adults were beheaded and the children were castrated. A boy named Li Liu was the son of a rebel named Li Mao-tz'e (Li Maozi) who rebelled on the border of Henan (Honan) and Anhui (Anhwei) provinces in 1872. Li Liu was captured when he was 6 years old by Qing government forces in Anhui (Anhwei) and handed over to Yulu (Yu Luh), the governor of Anhui. He was imprisoned in the office of the district magistrate of Huaining (Hwaining) until he reached 11 years old in 1877 and was then ordered to be handed to the Imperial Household Department for castration. His case appeared on 28 November 1877 in the Peking Gazette.
The Qing later changed its law in 1801, 1814, 1835 and 1845, saying that all the sons and grandsons of rebels who were ignorant of their father and grandfather's rebellious intents were to be sent to the Imperial Household Department for castration regardless of whether they were adults or children. Young boys would be imprisoned until reaching 11 and they would be castrated and boys between 11 and 16 would be castrated without respite. Many of these rebellions were caused by the Qing state persecuting religions and were provoked by Qing actions against these religious sects.
During the Qing, punitive castration was done on a man in Shanxi for breaking the law. He was married to a woman but could not father children with her due to his castration. She went back to her parents several times until her father committed murder suicide, with him hanging himself after she was hanged. This case appeared in Chen Dongyuan's book on women's history in China .
After the execution of anti-Qing revolutionary Xu Xilin (Hsü Hsi-lin) in 1907, his family including his son Xu Xuewen (1906–1991) were arrested by the Qing. Under Qing law, his son under the age of 16 was supposed to be castrated to become a eunuch and serve in the Qing palace. The Qing was overthrown in 1912 and the castration was not carried out. Xu Xuewen later married a German woman, Maria Henriette Margarete Bordan (1915–2003). They had a daughter together named Xu Naijin (Nancy Zi) (1937 – August 20, 2005) who married Chiang Hsiao-wen the son of the Republic of China President Chiang Ching-kuo and his wife, a Belarusian woman Chiang Fang-liang (Faina Ipat'evna Vakhreva).
Empress Dowager Longyu wanted the imperial palace to have the right to make more eunuchs during the negotiations for abdication of the Qing in 1912 in the Articles of Favourable Treatment but she was forced to concede her demand.
After the revolution of 1911–12 that toppled the Qing, the last emperor, Puyi, continued to live in the Forbidden City with his eunuchs as if the revolution had never happened while receiving financial support from the new Chinese republic until 1924 when the former Emperor and his entourage were expelled from the Forbidden City by the warlord General Feng Yuxiang. In 1923, after a case of arson that Puyi believed was started to cover the theft of his Imperial treasures, Puyi expelled all of the eunuchs from the Forbidden City.

## Notable Chinese eunuchs
### First millennium BC

* Zhao Gao (3rd Century BC): favourite of Qin Shihuangdi, who plotted against Li Si.
* Sima Qian (old romanization Ssu-ma Chi'en; 2nd/1st century BC): the first person to have practiced modern historiography – gathering and analyzing both primary and secondary sources to write his monumental history of the Chinese Empire.

### First millennium AD

* Cai Lun (old romanization Ts'ai Lun; 1st/2nd century AD): Former attribution to Lun as the inventor of paper has been rescinded following discovery of many earlier manuscripts written on paper. It is now highly questionable if he was directly involved in making paper.
* Huang Hao: eunuch in the state of Shu during the Three Kingdoms Period; also appears in the Romance of the Three Kingdoms.
* Cen Hun: eunuch in the state of Wu during the Three Kingdoms Period.
* Zhang Ci: eunuch and military general in the state of Former Qin during the Sixteen Kingdoms Period.
* Gao Lishi: a loyal and trusted friend of Tang emperor Xuanzong.
* Li Fuguo: Tang eunuch who began another era of eunuch rule.
* Yu Chao'en: Tang eunuch who began his career as army supervisor.
* Yang Liangyao

### Second millennium AD

* Jia Xian (c. 1010 – c. 1070): Chinese mathematician; invented the Jia Xian triangle for the calculation of square roots and cube roots.
* Zheng He (1371–1433): famous admiral who led huge Chinese fleets of exploration around the Indian Ocean.
* Bian Lingcheng (邊令誠)
* Wang Zhen: first Ming eunuch with much power; see Tumu Crisis.
* Gang Bing: patron saint of eunuchs in China who castrated himself to demonstrate his loyalty to the Yongle Emperor.
* Yishiha: admiral in charge of expeditions down the Amur River under the Yongle and Xuande Emperors.
* Liu Jin: corrupt eunuch official of the Ming dynasty and de facto emperor, member of the Eight Tigers.
* Wei Zhongxian: eunuch of the Ming dynasty, considered the most powerful eunuch in Chinese history.
* Wu Rui: a Chinese eunuch in Lê Dynasty Annam (Vietnam).
* An Dehai
* Li Lianying: a despotic eunuch of the Qing dynasty.
* Xin Xiuming (1878–1959): Entered Emperor Puyi's service in 1902; left palace service in 1911; became abbot of the Taoist temple at the Babaoshan Revolutionary Cemetery by 1930; wrote memoir Eunuch's Recollection (老太监的回忆).
* Sun Yaoting (1902–1996): last surviving imperial eunuch of Chinese history.