Submitted:
21 March 2026
Posted:
23 March 2026
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Theoretical Framework
2.1. Confucian Biopolitics as Analytical Lens
Falsifiability criterion.
Incremental contribution relative to existing frameworks.
2.2. Mechanisms of Governance: Kinship, Language, and Institutional Scripting
3. Methodology
3.1. Archival Research
- Daqing lüli (大清律例, Statutes and Sub-statutes of the Great Qing) [24]—the dynasty’s comprehensive legal code. We draw on specific articles governing eunuch recruitment (age and marital-status requirements: “年在十六岁以下并未娶有妻室者”), the state monopoly on castration (“凡有私自阉割者...皆处斩”), and disproportionate punishment for eunuch infractions (self-harm within the Forbidden City as a capital offence). These provisions are treated as evidence of Confucian biopolitical governance: the state simultaneously authorises and criminalises bodily modification, conditioning institutional legibility on compliance with kinship-moral norms.
- Daqing Huidian and Huidian Zeli (大清会典, 大清会典则例) [25]—the Collected Statutes and their sub-regulations, which codify palace administrative rules. We cite provisions governing eunuch quotas, rank hierarchies, and prohibitions (e.g., exclusion from literacy and Manchu-language education), as well as the criminalisation of unauthorised castration and the imposition of extended-kin punishment.
- Guochao Gongshi (国朝宫史) [26]—an official history of the Qing palace. We cite entries on eunuch stipends (“每月俱银二两米一斛半”) and ritual subordination protocols (mandatory kneeling before imperial princes), which document the material and ceremonial scripting of eunuch status.
- Ming Gongshi (明宫史) [27]—a Ming palace record used specifically for the Anletang welfare institution (“凡内官有疾者送此调理”), which provides evidence of proto-welfare infrastructure for gender-variant bodies excluded from normative kinship support.
3.2. GIS Spatial Analysis
- Imperial Eunuch Settlements: We gathered historical information on where eunuchs resided or congregated, especially post-retirement or during service. Key sources were historical maps of Beijing and literature on eunuch communities. Notably, the existence of the Tian Yi Mu (田义墓), a eunuch tomb complex west of Beijing, indicates a locale of eunuch significance. Also, eunuchs often lived within the Forbidden City during service; after retirement, some settled in Beijing’s Liu Li Chang area or near eunuch-operated temples. We georeferenced addresses from Qing memoirs (e.g., the residence of the last eunuch, Sun Yaoting) and from Qing archives listing the locations where stipends were delivered. Admittedly, data on eunuch residences is sparse beyond Beijing, as most eunuchs served in the capital. Nonetheless, we included any known eunuch-origin villages (some specific villages in Hebei and Shandong were famed for producing eunuchs) to see regional patterns.
- Contemporary LGBTQ+ NGOs: We created a dataset of known LGBTQ and specifically transgender-focused non-governmental organisations and community centres in China over the last 5–10 years. This was done through web research (using resources such as the UNDP report on transgender people in China and NGO directories). We recorded the city and district of each organization’s main office. The distribution is heavily weighted toward major cities (Beijing, Shanghai, Guangzhou, Chengdu, etc.), with a few in provincial capitals.
3.3. Computational Text Analysis
Analytical rationale.
Corpus design.
- Historical Corpus (Ming Shilu, 明实录): The Ming Veritable Records cover all 14 emperors (1368–1644), totalling approximately 56 million characters—the most comprehensive single collection of official Chinese historical writing. We obtained full digitized texts via the Daizhige open-access repository [28] and applied keyword filtering for fifteen eunuch-related terms (宦官, 太监, 内监, 司礼监, 魏忠贤, 王振, and eight further terms). This yielded 14,043 contextual segments totalling 2.19 million characters, drawn from all 14 reigns—to our knowledge the first corpus-scale computational analysis of eunuch discourse across the full Ming dynasty. Segments comprise the matched passage plus 80 characters of context on each side; the corpus thus captures eunuch-related language in its immediate discursive environment rather than as isolated occurrences. Text was tokenized using jieba [29] with 22 domain-specific custom terms added to ensure accurate segmentation of classical administrative vocabulary.
- Contemporary Corpus (Chinese Wikipedia): We retrieved 50 Chinese Wikipedia articles [30] on transgender and related topics via the MediaWiki API, yielding 246,131 characters across 689 paragraphs. Wikipedia was chosen rather than social media for a principled reason: like the Ming Shilu, Wikipedia is formalised encyclopedic knowledge production—collaboratively curated, expository in register, and oriented toward systematic description. The corpus pairing is thus methodologically symmetric: official chronicle knowledge production (Ming) versus open encyclopedic knowledge production (contemporary), both representing how a society formally organises knowledge about gender variance. Social media discourse, while richer in an informal register, would introduce a register asymmetry that would complicate cross-century comparison. A representativeness caveat is warranted because Chinese Wikipedia is blocked on the mainland, leading its editor base to skew toward Taiwan, Hong Kong, and overseas Chinese users. The corpus may therefore underrepresent mainland official discourse (e.g., CCMD pathologising language) while overrepresenting international LGBT rights framing. This limits the corpus’s claim to represent specifically mainland Chinese knowledge production; we treat it instead as representing Sinophone encyclopedic discourse more broadly. As a partial corrective, we additionally analysed 478 Zhihu posts [31]—a mainland-accessible platform—as a robustness check; supplementary results are reported in Section 5.
A note on temporal scope.
LDA topic modeling.
Chi-square cross-corpus keyword analysis.
- 1.
- Diagnostic translation (significant, contemporary-dominant): terms with significantly higher contemporary rates (精神病, 歧视, 家庭) confirm that the governing vocabulary has shifted from Confucian moral registers to biomedical and rights-based registers.
- 2.
- Moral register persistence (non-significant): terms appearing at statistically indistinguishable rates across 600 years (妖, ; 欺骗, ) are consistent with the hypothesis that a substrate of ontological stigma vocabulary persists across institutional discontinuities. Non-significant frequency differences do not, by themselves, prove resonance, but they are consistent with it — especially when interpreted alongside collocate analysis and the broader triangulated design.
- 3.
- Semantic migration (significant, contemporary-dominant but in theoretically meaningful direction): 传宗接代 () is significantly more common in contemporary discourse, where it appears specifically in discussions of family pressure on transgender individuals—the same underlying structural anxiety about lineage continuity, now expressed through modern vernacular rather than classical kinship vocabulary.
Equivalence testing and baseline controls.
3.4. Comparative and Cross-Cultural Analysis
3.5. Ethical Considerations
4. Historical Findings: Imperial Eunuchs, Biopolitical Governance, and Stigma
4.1. Liminal Lives within Confucian Order
4.2. Institutional Controls and Eunuch Community
- Quota and Recruitment Control. The Daqing lüli (大清律例) stipulated that new eunuchs must be “年在十六岁以下并未娶有妻室者” (under the age of sixteen and unmarried) [24], verified by the Imperial Household Department before admission to service. This legal requirement simultaneously operationalised age and marital status as preconditions for bodily transformation: to enter state service as a eunuch required demonstrating that one had not yet incurred the normative obligations of Confucian male adulthood. The same code further specified that the state held monopoly over castration itself: “凡有私自阉割者本身及下手之人皆处斩全家发边远充军” (any person who castrates themselves without authorization, along with whoever performs the act, shall be executed; the entire family shall be exiled to the frontier) [25]. Unauthorised bodily modification was thus a capital offence for the castrated person, the practitioner, and extended kin. The parallel with contemporary regulations requiring state-authorised medical procedures for gender-affirming surgery is structural, not coincidental.
- Surveillance. Eunuchs had their own internal hierarchy and supervisors who monitored each other. The head eunuch (总管太监) was kept in check by Imperial Household Department ministers. The Guochao Gongshi (国朝宫史) records an imperial edict specifying that even the chief eunuch must “必当拜跪请安” (kneel and pay obeisance) when seeing imperial princes [26], codifying bodily subordination in the most intimate ceremonial terms. Eunuchs were also kept functionally illiterate by design: denying them education beyond basic reading prevented access to state secrets and the capacity to submit petitions.
- Punishments. Eunuchs were subject to disproportionately harsh punishments for infractions, a disparity that was itself a performance of hierarchy. The Daqing lüli specified that “凡太监在紫禁城内持金刃自伤者斩立决” (any eunuch who self-inflicts injury with a blade within the Forbidden City shall be immediately executed) [24]: even self-harm within the palace grounds was a capital offence. This provision reveals the biopolitical stakes of the eunuch body — it was state property, and its integrity (or violation) within the imperial precinct carried the weight of treason.
4.3. Spatial Evidence: Geographic Concentration of Eunuch Activity

Diachronic variation: stigma as political cycle.
5. Contemporary Findings: Transgender Citizens in China
5.1. Contemporary Governance Context
Legal-medical gatekeeping.
Familial dynamics.
Civil-society formation.
5.2. Spatial and Textual Evidence: Continuities Across Time
NGO Geographic Clustering.


Spatial Overlay and Interpretation.
Methodological note on spatial confounding.
Temporal expansion of LGBTQ+ civil society.
Topic Model Results.
Chi-Square Cross-Corpus Keyword Analysis.
Equivalence testing and baseline controls.
Collocate profiles: from sorcery to slur.

Extended keyword analysis.
6. Comparative Perspectives: Ottoman and Japanese Cases
7. Discussion and Policy Implications
7.1. Confucian Biopolitics as Analytical Contribution
7.2. Policy Implications
- 1.
- Dismantling Conditional Gatekeeping. The gender marker change process should remove surgery as a precondition and convert parental consent from a veto into a structured engagement process. The Chinese medical community should adopt WHO ICD-11 terminology (性别不一致, gender incongruence); our computational analysis suggests that linguistic classification functions as a governance mechanism. Anti-discrimination protections based on gender identity should be enacted in employment, housing, and healthcare.
- 2.
- Welfare Infrastructure. The historical Anletang and eunuch temple networks represent ad hoc responses to the welfare needs of a kinship-excluded population. The structural parallel is direct: transgender individuals who face family rejection lack the kin-based safety net on which Chinese social provision depends. Community centres, healthcare funds, and mutual aid associations—resourced through mixed public-civil society funding—address this gap.
- 3.
- Engaging Kinship Structures. The family is the most durable site of stigma production; interventions that bypass it are less effective than those that engage it. Structured family counselling should be incorporated into transition pathways as education rather than gatekeeping. State media can leverage the recognition that gender variance has deep roots in Chinese history to provide cultural permission structures for acceptance.
8. Conclusion
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Dale, M.S. Inside the world of the eunuch: a social history of the Emperor’s servants in Qing China; Hong Kong University Press, 2018.
- Chiang, H. After eunuchs: Science, medicine, and the transformation of sex in modern China; Columbia University Press, 2018.
- Rawski, E.S. The last emperors: A social history of Qing imperial institutions; Univ of California Press, 1998.
- Kutcher, N.A. Eunuch and emperor in the great age of Qing rule; Univ of California Press, 2018.
- Fappani, V. The Protection of Transgender Workers in China: Between Law and Society 2024.
- Engebretsen, E.L. Queer women in urban China: An ethnography; Routledge, 2013.
- Chiang, H. Epistemic modernity and the emergence of homosexuality in China. Gender & History 2010, 22, 629–657. [CrossRef]
- Foucault, M. The History of Sexuality, Volume 1: An Introduction; Pantheon Books: New York, 1978. Translated by Robert Hurley.
- Zhang, L.; Ong, A. Privatizing China: socialism from afar; Cornell University Press, 2008.
- Rofel, L. Desiring China: Experiments in neoliberalism, sexuality, and public culture; Duke University Press, 2007.
- Greenhalgh, S. Cultivating global citizens: Population in the rise of China; Harvard University Press, 2010.
- Hathaway, J.; Agha, B. Chief Eunuch of the Ottoman imperial harem; Oneworld, Oxford, 2005.
- Pflugfelder, G.M. Cartographies of desire: Male-male sexuality in Japanese discourse, 1600-1950; Univ of California Press, 1999.
- Ames, R.T. Confucian role ethics: A vocabulary; The Chinese University of Hong Kong Press, 2011.
- Slingerland, E.; et al. Analects: With selections from traditional commentaries; Hackett Publishing, 2003.
- Farquhar, J. Knowing practice: The clinical encounter of Chinese medicine; Routledge, 2018.
- Huang, P.C. Civil justice in China: representation and practice in the Qing; Stanford University Press, 1996.
- Foucault, M. Security, Territory, Population: Lectures at the Collège de France, 1977–1978; Palgrave Macmillan: New York, 2007.
- Fei, X. From the Soil: The Foundations of Chinese Society; University of California Press, 1992. Original work published 1947.
- Sommer, M.H. The Fox Spirit, the Stone Maiden, and Other Transgender Histories from Late Imperial China; Columbia University Press, 2024.
- Butler, J. Performative acts and gender constitution: An essay in phenomenology and feminist theory. In The performance studies reader; Routledge, 2025; pp. 186–196.
- Spade, D. Normal Life: Administrative Violence, Critical Trans Politics, and the Limits of Law, revised and expanded ed.; Duke University Press: Durham, NC, 2015.
- Conrad, P. The medicalization of society: On the transformation of human conditions into treatable disorders; Vol. 14, Johns Hopkins University Press Baltimore, 2007.
- Qing Board of Punishments. 大清律例(Daqing lüli / Great Qing Code); 1740. Yongzheng-era codification. Digitized text accessed via Daizhige repository (https://github.com/garychowcmu/daizhigev20), 2026.
- Qing Imperial Household. 钦定大清会典则例 (Qinding Daqing Huidian Zeli / Imperially Commissioned Precedents of the Collected Statutes); 1764. Qianlong-era edition. Digitized text accessed via Daizhige repository, 2026.
- Yunbu.; he de, S., Eds. 国朝宫史 (Guochao Gongshi / History of the Qing Imperial Palace); 1769. Compiled by order of the Qianlong Emperor. Digitized text accessed via Daizhige repository, 2026.
- Lü, B. 明宫史 (Ming Gongshi / History of the Ming Imperial Palace); 1644. Compiled in the late Ming. Digitized text accessed via Daizhige repository, 2026.
- Chow, G.; contributors. Daizhige: A Repository of Classical Chinese Historical Texts. https://github.com/garychowcmu/daizhigev20, 2024. Accessed March 2026. Ming Shilu (明实录) files used for corpus construction.
- Sun, J. jieba: Chinese Text Segmentation. https://github.com/fxsjy/jieba, 2023. Version 0.42.
- Wikimedia Foundation. Chinese Wikipedia (ZhWiki). https://zh.wikipedia.org, 2024. Articles on transgender, LGBT rights, gender identity, and related topics retrieved via the MediaWiki API. Accessed March 2026.
- Wang, R. Zhihu-KOL: A Chinese Knowledge Opinion Leader Dataset. https://huggingface.co/datasets/wangrui6/Zhihu-KOL, 2023. HuggingFace dataset. Accessed March 2026. Used as supplementary robustness corpus after keyword filtering for transgender-related content.
- Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine Learning in Python. Journal of Machine Learning Research 2011, 12, 2825–2830.
- Peirce, L.P. The Imperial Harem: Women and Sovereignty in the Ottoman Empire; Oxford University Press: New York, 1993.
- United Nations Development Programme. Being LGBTI in China: A National Survey on Social Attitudes towards Sexual Orientation, Gender Identity and Gender Expression, 2016. Accessed March 2024.




| Dataset | n | I | z | p-value | Result | |
|---|---|---|---|---|---|---|
| LGBTQ+ NGOs (national) | 20 | 0.735 | −0.053 | 6.020 | <.001 | Strongly clustered*** |
| *** (two-tailed, normal approximation). k-NN weight matrix (). | ||||||
| Ming Topic | Top Keywords (jieba) | Wikipedia Topic | Top Keywords |
|---|---|---|---|
| Court Ceremony | 内官 (inner eunuch), 皇太子 (crown prince), 皇后 (empress), 礼毕 (rite complete), 立于 (standing at) | Healthcare | 性别 (gender), 跨性别 (transgender), 女性 (female), 手术 (surgery), 男性 (male) |
| Censorate Supervision | 太监 (chief eunuch), 内臣 (inner minister), 给事中 (remonstrance off.), 御史 (censor), 内官 (inner eunuch) | Eunuch History | 郑和 (Zheng He), 宦官 (eunuch), 同志 (comrade/gay), 西洋 (Western Ocean), 研究所 (research inst.) |
| Tombs & Records | 皇帝 (emperor), 内官 (inner eunuch), 陵寝 (imperial tombs), 中官 (court eunuch), 实录 (veritable records) | Gender Identity | 跨性别 (transgender), 阉割 (castration), 中国 (China), 同性恋 (homosexual), 研究所 (research inst.) |
| Inner Palace Service | 内侍 (palace attendant), 皇后 (empress), 奏请 (petition), 执事官 (ritual official), 导引 (ceremony guide) | Legal Rights | 宦官 (eunuch), 同性 (same-sex), 法律 (law), 婚姻 (marriage), 人权 (human rights) |
| Provincial Eunuchs | 太监 (chief eunuch), 指挥 (commander), 总兵 (mil. commander), 镇守 (garrison cmd.), 佥事 (asst. commiss.) | Gender Expression | 性别 (gender), 跨性别 (transgender), 女性 (female), 同性 (same-sex), 性取向 (sexual orient.) |
| Keyword | Ming/1k | Wiki/1k | p | |
|---|---|---|---|---|
| 妖 (demon/monster) | 0.072 | 0.065 | 0.073 | .788 (n.s.) |
| 欺骗 (deception) | 0.005 | 0.008 | 0.030 | .863 (n.s.) |
| 传宗接代 (lineage) | 0.000 | 0.008 | 9.279 | .002** |
| 奸 (traitor/treachery) | 0.416 | 0.138 | 43.386 | <.001*** |
| 忠 (loyalty) | 1.084 | 0.126 | 204.927 | <.001*** |
| 精神病 (mental illness) | 0.000 | 0.340 | 737.973 | <.001*** |
| 歧视 (discrimination) | 0.000 | 1.062 | 2313.930 | <.001*** |
| 家庭 (family) | 0.000 | 0.271 | 586.628 | <.001*** |
| 惩处 (punishment) | 0.001 | 0.016 | 15.376 | <.001*** |
| 羞耻 (shame) | 0.000 | 0.024 | 43.972 | <.001*** |
| * ; ** ; *** ; n.s. = not significant. | ||||
| Keyword | Ming/1k | Wiki/1k | TOST p | Interpretation | |
|---|---|---|---|---|---|
| 妖 (demon) | 0.072 | 0.065 | .003 | 1564 | Equivalent (decisive) |
| 自宫/自阉 (self-castration) | 0.019 | 0.016 | <.001 | 1567 | Equivalent (decisive) |
| 欺骗 (deception) | 0.005 | 0.008 | <.001 | 1416 | Exploratory† |
| TOST equivalence bound: ±0.05/1k chars (≈1 SE at base rate in smaller corpus). | |||||
| : decisive evidence for equal-rate model. † Wiki : low power. | |||||
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).