Recognition of self-antigen-derived epitopes presented by major histocompatibility complex class II (MHC II) molecules on thymic epithelial cells (TECs) is critical for the generation of a functional and self-tolerant CD4 T-cell repertoire. Whereas haematopoietic antigen-presenting cells generate MHC-II-peptide complexes predominantly through the processing of endocytosed polypeptides, it remains unknown if and how TECs use unconventional pathways of antigen presentation. Here we address the role of macroautophagy, a process that has recently been shown to allow for endogenous MHC II loading, in T-cell repertoire selection in the mouse thymus. In contrast to most other tissues, TECs had a high constitutive level of autophagy. Genetic interference with autophagy specifically in TECs led to altered selection of certain MHC-II-restricted T-cell specificities and resulted in severe colitis and multi-organ inflammation. Our findings indicate that autophagy focuses the MHC-II-peptide repertoire of TECs on their intracellular milieu, which notably comprises a wide array of otherwise strictly 'tissue-specific' self antigens. In doing so, it contributes to T-cell selection and is essential for the generation of a self-tolerant T-cell repertoire.