Histone deacetylase 7 (HDAC7) is a T-cell receptor (TCR) signal-dependent regulator of differentiation that is highly expressed in CD4/CD8 double-positive (DP) thymocytes. Here, we examine the effect of blocking TCR-dependent nuclear export of HDAC7 during thymic selection, through expression of a signal-resistant mutant of HDAC7 (HDAC7-ΔP) in thymocytes. We find that HDAC7-ΔP transgenic thymocytes exhibit a profound block in negative thymic selection, but can still undergo positive selection, resulting in the escape of autoreactive T cells into the periphery. Gene expression profiling reveals a comprehensive suppression of the negative selection-associated gene expression programme in DP thymocytes, associated with a defect in the activation of MAP kinase pathways by TCR signals. The consequence of this block in vivo is a lethal autoimmune syndrome involving the exocrine pancreas and other abdominal organs. These experiments establish a novel molecular model of autoimmunity and cast new light on the relationship between thymic selection and immune self-tolerance.