Medullary thymic epithelial cells (mTECs) play a central role in the establishment of T cell central immunological tolerance by promiscuously expressing tissue-restricted antigens (TRAs) and presenting them to developing T cells, leading to deletion of T cells responding to self-antigens. However, molecular mechanisms especially epigenetic regulation of mTEC homeostasis and TRA expression remain elusive. Here we show that the H3K27 demethylase Kdm6b is essential to maintain the postnatal thymic medulla by promoting mTEC survival and regulating the expression of TRA genes. Moreover, mice lacking Kdm6b developed pathological autoimmune disorders. Mechanically, Kdm6b exerted its function by reducing repressive H3K27 trimethylation (H3K27me3) at the promoters of anti-apoptotic gene Bcl2 and a set of Aire-dependent TRA genes. Thus, our findings reveal a dual role of Kdm6b in the regulation of mTEC-mediated T cell central tolerance.