Symbiotic microbes impact the severity of a variety of diseases through regulation of T-cell development. However, little is known regarding the molecular mechanisms by which this is accomplished. Here we report that a secreted factor, Erdr1, is regulated by the microbiota to control T-cell apoptosis. Erdr1 expression was identified by transcriptome analysis to be elevated in splenic T cells from germfree and antibiotic-treated mice. Suppression of Erdr1 depends on detection of circulating microbial products by Toll-like receptors on T cells, and this regulation is conserved in human T cells. Erdr1 was found to function as an autocrine factor to induce apoptosis through caspase 3. Consistent with elevated levels of Erdr1, germfree mice have increased splenic T-cell apoptosis. RNA sequencing of Erdr1-overexpressing cells identified the up-regulation of genes involved in Fas-mediated cell death, and Erdr1 fails to induce apoptosis in Fas-deficient cells. Importantly, forced changes in Erdr1 expression levels dictate the survival of auto-reactive T cells and the clinical outcome of neuro-inflammatory autoimmune disease. Cellular survival is a fundamental feature regulating appropriate immune responses. We have identified a mechanism whereby the host integrates signals from the microbiota to control T-cell apoptosis, making regulation of Erdr1 a potential therapeutic target for autoimmune disease.