Central tolerance of thymocytes to self-antigen depends on the medullary thymic epithelial cell (mTEC) transcription factor autoimmune regulator (Aire), which drives tissue-restricted antigen (TRA) gene expression. Vitamin D signaling regulates Aire and TRA expression in mTECs, providing a basis for links between vitamin D deficiency and autoimmunity. We find that mice lacking Cyp27b1, which cannot produce hormonally active vitamin D, display profoundly reduced thymic cellularity, with a reduced proportion of Aire+ mTECs, attenuated TRA expression, and poorly defined cortical-medullary boundaries. Markers of T cell negative selection are diminished, and organ-specific autoantibodies are present in knockout (KO) mice. Single-cell RNA sequencing revealed that loss of Cyp27b1 skews mTEC differentiation toward Ccl21+ intertypical TECs and generates a gene expression profile consistent with premature aging. KO thymi display accelerated involution and reduced expression of thymic longevity factors. Thus, loss of thymic vitamin D signaling disrupts normal mTEC differentiation and function and accelerates thymic aging.