The thymus is a small, butterfly-shaped gland that sits behind your breastbone, just above the heart, and it serves as the training ground where your immune system’s T cells learn to distinguish your own body from foreign invaders. Without it, you would lack the cellular army that fights infections, destroys cancerous cells, and keeps autoimmune reactions in check. For centuries, the thymus was considered a vestigial organ with no clear purpose. Its immunological role was only demonstrated in 1961, when researchers showed that removing the thymus from newborn mice left them with crippled immune systems and extreme vulnerability to infections.1PubMed. The discovery of thymus function and of thymus-derived lymphocytes Since then, the thymus has emerged as one of the most consequential organs in the body, and recent research suggests it remains more important in adulthood than anyone assumed.
What the Thymus Looks Like and How It Is Organized
The thymus is largest relative to body size in infancy and early childhood, when it can weigh around 30 to 40 grams. It has two lobes, each divided into an outer region called the cortex and an inner region called the medulla. The cortex is densely packed with immature T cells (called thymocytes) along with specialized epithelial cells that guide their development. The medulla contains larger, more mature T cells alongside a greater variety of epithelial cells and other support cells.2PubMed. Normal structure, function and histology of the thymus This two-zone architecture is not decorative. Each zone performs a distinct step in the process of turning raw immune precursors into functioning T cells.
How the Thymus Trains T Cells
T-cell development begins not in the thymus but in the bone marrow, where blood-forming stem cells produce early progenitor cells. These progenitors leave the marrow, circulate through the bloodstream, and home in on the thymus using chemical signals that guide them to the right address.3PubMed Central. Hematopoietic progenitor migration to the adult thymus Once inside the thymus, these cells undergo a gauntlet of testing that takes several weeks and eliminates the vast majority of them.
The first major checkpoint is called positive selection, and it happens in the cortex. Each developing T cell randomly generates a unique receptor on its surface, which determines what molecules it can recognize. The cortical epithelial cells present fragments of the body’s own proteins to these developing cells. If a T cell’s receptor can interact, even weakly, with these self-protein fragments, it receives a survival signal and moves on. If its receptor is too poorly matched to recognize anything at all, the cell dies by neglect.4PubMed. Positive-selection-inducing self-peptides displayed by cortical thymic epithelial cells The cortical epithelial cells use a specialized protein-processing system that creates a unique set of protein fragments, and this specialized machinery appears to be essential for building a well-rounded immune repertoire.5PubMed. Role of thymic cortex-specific self-peptides in positive selection of T cells
The second checkpoint, negative selection, happens primarily in the medulla and is arguably the thymus’s most remarkable trick. T cells that survived the cortex now face a tougher test: if their receptor binds too strongly to any of the body’s own proteins, they are killed off or converted into regulatory cells. The challenge is that many proteins only appear in specific organs, like insulin in the pancreas or a lung-specific surfactant. How can the thymus test against proteins it normally would never encounter? This is where a gene called AIRE (Autoimmune Regulator) comes in. AIRE forces medullary epithelial cells to produce samples of tissue-specific proteins from all over the body, effectively creating a molecular library of “self” right there in the thymus.6PubMed Central. Aire and T cell development T cells that react strongly to any of these self-proteins are deleted.7PubMed. The cellular mechanism of Aire control of T cell tolerance
When AIRE does not work properly, the consequences are dramatic. In humans, mutations in the AIRE gene cause a condition in which the immune system attacks multiple organs, because the T cells that should have been eliminated in the thymus escape into the body and wage war against healthy tissue.
Regulatory T Cells and Keeping the Peace
Not every self-reactive T cell that the thymus catches gets destroyed. Some are instead reprogrammed into regulatory T cells, a specialized subset whose job is to actively suppress immune attacks against the body’s own tissues. These regulatory cells act as a second safety net, patrolling the body and calming down immune responses that threaten to go overboard. Research using single-cell analysis techniques has mapped multiple stages of regulatory T-cell development within the thymus, showing that this is not a single event but a carefully orchestrated process with distinct intermediate steps.8PubMed Central. Tracking Regulatory T Cell Development in the Thymus Using Single-Cell RNA Sequencing/TCR Sequencing The thymus, then, does not merely produce soldiers for your immune system. It also produces the peacekeepers.
Why the Thymus Shrinks With Age
Starting around puberty, the thymus begins to shrink in a process called involution. The functional tissue gradually gets replaced by fat, the clear boundary between cortex and medulla blurs, and both cortical and medullary epithelial cells decline in number.9PubMed Central. Age-related thymic involution: Mechanisms and functional impact By middle age, much of the thymus is fatty tissue, and its output of new T cells has dropped substantially. By old age, the organ is a shadow of its childhood self.
This shrinkage is driven by a combination of hormonal changes, chronic low-grade inflammation, and altered signaling between developing T cells and the epithelial cells that support them.10PubMed Central. Age-related thymic involution: Mechanistic insights and rejuvenating approaches to restore immune function The practical effect is that older adults produce far fewer new, naive T cells. Instead, they increasingly rely on the memory T cells generated earlier in life. This is one reason the elderly tend to respond less vigorously to new infections and new vaccines, and it is thought to contribute to the rising risk of cancer with age, since the immune system’s surveillance capacity narrows.
Sex Differences in Thymic Aging
The thymus does not shrink at the same rate in everyone, and one of the clearest biological divides is between males and females. Androgens, the hormones that are higher in males, appear to actively suppress thymic function. Research comparing thymic epithelial cells in males and females found that a key gene governing thymus development and maintenance, FOXN1, was expressed at roughly half the level in male cortical epithelial cells. Downstream targets of FOXN1 that are crucial for T-cell selection were similarly suppressed.11Scientific Reports. Sex hormones have pervasive effects on thymic epithelial cells Males who had been castrated showed thymic gene expression patterns more similar to females, reinforcing that androgens were responsible for the suppression. This helps explain why males generally undergo thymic involution faster than females and, more broadly, why there are well-documented sex differences in immune function throughout life.
What Happens When the Thymus Is Missing or Removed
For decades, many surgeons considered the adult thymus expendable. It was routinely removed during open-heart surgery simply because it sits in the way of the surgical field. A landmark study published in the New England Journal of Medicine challenged that assumption. Looking at more than 1,100 adults who had their thymus removed during cardiac surgery and comparing them to matched controls who had the same surgeries without thymectomy, the researchers found that five years after surgery, the thymectomy group had a notably higher rate of death from all causes (about 8% versus 3%) and roughly double the risk of developing cancer. Among patients who had no preexisting immune problems, the risk of autoimmune disease was also elevated.12PubMed Central. Health Consequences of Thymus Removal in Adults These findings were striking because they suggested the adult thymus, despite being partially involuted, still contributes meaningfully to immune health.
At the other end of the spectrum, children born without a thymus face severe immunodeficiency. Congenital athymia leaves patients with virtually no T cells while their B cells and natural killer cells remain intact. The condition often mimics a form of severe combined immunodeficiency and carries a high risk of life-threatening infections.13PubMed Central. Congenital Athymia: Genetic Etiologies, Clinical Manifestations, Diagnosis, and Treatment The most well-known genetic cause is 22q11.2 deletion syndrome (often called DiGeorge syndrome), which can produce a spectrum from mild thymic underdevelopment to complete absence, alongside effects on the heart and parathyroid glands.14PubMed. Immune and Genetic Features of the Chromosome 22q11.2 Deletion (DiGeorge Syndrome) Treatment for complete athymia is fundamentally different from standard bone marrow transplant. Investigational approaches using cultured thymus tissue aim to provide the missing organ itself rather than replace the downstream cells it produces.
Stress and Acute Thymic Shrinkage
Beyond the slow, age-related involution, the thymus can shrink rapidly in response to acute stressors. Severe infections, malnutrition, pregnancy, chemotherapy, and intense psychological or physical stress can all cause the thymus to atrophy within days.15PubMed Central. Cytokines, leptin, and stress-induced thymic atrophy This acute involution involves a rapid die-off of the developing T cells in the cortex, often driven by stress hormones like cortisol. The good news is that, unlike age-related involution, acute thymic atrophy is typically reversible. Once the stressor resolves, the thymus can bounce back, repopulating with new progenitor cells and resuming T-cell production.16PubMed. Acute Thymic Involution and Mechanisms for Recovery This distinction matters clinically: a child whose thymus appears small on a chest X-ray taken during a serious illness may not actually have a thymic problem at all. The gland may simply be temporarily suppressed.
Thymomas and Their Link to Myasthenia Gravis
The thymus can develop tumors called thymomas, which arise from the epithelial cells of the organ rather than from the T cells passing through it. Thymomas are uncommon, but they have an outsized connection to autoimmune disease. About half of patients with cortical thymomas develop myasthenia gravis, a condition in which antibodies attack the receptors that allow nerves to communicate with muscles, causing weakness and fatigue. Looking at it from the other direction, roughly 15% of people with myasthenia gravis turn out to have a thymoma.17PubMed Central. Thymoma in myasthenia gravis: from diagnosis to treatment The presumed mechanism is that the tumor disrupts the normal negative selection process, allowing self-reactive T cells to escape and trigger an autoimmune response. Surgical removal of the thymoma is a standard part of treatment, though outcomes vary depending on whether ectopic thymic tissue remains elsewhere in the body.
Thymic Tissue in Unexpected Places
During embryonic development, the thymus forms from tissue in the neck and descends into the chest. Sometimes bits of thymic tissue get left behind along that migration path. These deposits, called ectopic thymic tissue, can show up in the neck, near the thyroid gland, at the base of the skull, or even near the middle ear.18PubMed Central. Ectopic Cervical Thymus in Adult: An Incidental Finding In children, ectopic thymic tissue within the thyroid gland is increasingly detected incidentally on neck ultrasounds. A case series from a London hospital found these deposits in children ranging from six months to ten years old and noted that, in most cases, the tissue could be confidently identified on ultrasound by comparing it to the child’s normal thymus, sparing them unnecessary biopsies.19PubMed Central. Significance of ectopic intrathyroidal thymic tissue detected on ultrasound in different paediatric age groups: a proposed classification to guide investigation and management
Ectopic thymic tissue is not always harmless background noise, however. In people with myasthenia gravis who undergo surgical thymus removal, the presence of leftover ectopic tissue was found in about 40% of patients in one study and was associated with significantly worse surgical outcomes. Only about 13% of patients with residual ectopic tissue achieved complete remission, compared with nearly 48% of those without it.20PubMed. Prevalence of ectopic thymic tissue in myasthenia gravis and its clinical significance
The Thymus and Cancer Immunotherapy
One of the more consequential areas where the thymus matters today is cancer immunotherapy. Checkpoint blockade therapy, the approach that has transformed treatment for melanoma, lung cancer, and other malignancies, works by removing the brakes on T cells so they can attack tumors more aggressively. But the therapy only works if the patient already has T cells capable of recognizing the tumor. That T-cell diversity is ultimately set by the thymus. Patients with a narrower range of T-cell receptors, whether from age-related thymic involution or from prior chemotherapy that damaged the thymus, may be less likely to respond to checkpoint blockade treatment.21PubMed Central. Thymic Function and T-Cell Receptor Repertoire Diversity: Implications for Patient Response to Checkpoint Blockade Immunotherapy This connection has made thymic function newly relevant to oncology. A shrinking thymus is not just an abstract marker of aging; it may directly limit the effectiveness of one of the most important advances in cancer treatment.
The Thymus as an Endocrine Organ
The thymus does not just produce T cells. It also secretes hormones, including a peptide called thymulin, that influence immune cell behavior throughout the body. These thymic hormones interact with the brain’s hormonal control system (the hypothalamic-pituitary-adrenal axis) in a two-way loop: hormones from the brain affect the thymus, and hormones from the thymus affect the brain.22PubMed. Thymus hormones as prospective anti-inflammatory agents This bidirectional communication means the thymus is embedded in the body’s broader hormonal network, not operating in isolation.23Endocrine Reviews. Neuroendocrine Control of Thymus Physiology Some researchers have explored thymic hormones as potential anti-inflammatory agents, though this remains largely experimental.
Efforts to Regenerate or Replace the Thymus
Given how much immune function hinges on the thymus, researchers have been chasing ways to reverse its decline. One of the most striking results came from a mouse study that targeted FOXN1, the same transcription factor suppressed by androgens. When researchers forced aged mouse thymic epithelial cells to ramp up FOXN1 production, the fully involuted thymus regenerated dramatically, producing new T cells at levels approaching those of a young animal. The regrown organ closely resembled a juvenile thymus in structure and gene activity.24PubMed Central. Regeneration of the aged thymus by a single transcription factor This remains a proof-of-concept result in mice, not a therapy you can walk into a clinic and get. But it established that age-related thymic involution is not a one-way street.
Beyond gene-based approaches, researchers are also exploring growth hormone and IGF-1 signaling, cytokine therapies, sex steroid ablation (temporarily blocking testosterone or estrogen to let the thymus rebound), and stem cell transplantation to coax the thymus back to life.25PubMed. Thymus regeneration in countering immunosenescence: Mechanisms, strategies and future perspectives
For people who lack a thymus entirely, bioengineering approaches are taking a different angle. Researchers have built artificial thymic organoids, miniature lab-grown structures seeded with thymic epithelial cells on scaffolds made from decellularized donor thymuses. When these organoids were transplanted into mice that had no thymus, bone marrow progenitors migrated to the implant and developed into a diverse, functional T-cell population.26PubMed Central. Construction of Thymus Organoids from Decellularized Thymus Scaffolds Separately, researchers have established organoid cultures from thymic tissue that maintain the organ’s ability to support T-cell development in a dish, offering a platform for both basic research and potential therapeutic use.27PubMed Central. Thymic epithelial organoids mediate T-cell development
An Ancient Organ Shared Across Vertebrates
The thymus is not a recent evolutionary invention. All jawed vertebrates, from fish to humans, have a thymus, and its appearance in evolution coincided with the emergence of the adaptive immune system: the ability to mount targeted, memory-forming responses to specific pathogens.28PubMed. Thymus: Conservation in evolution Even jawless fish like lampreys, the most ancient surviving vertebrates, appear to have a primitive thymus-like structure, suggesting that T cells and the organ that trains them co-evolved very early in vertebrate history.29PubMed. Evolution of thymus organogenesis Across species, the thymus has also co-opted hormones and neuropeptides found in the nervous system to create the right microenvironment for T-cell maturation, pointing to an ancient integration between the immune and endocrine systems that persists today.