When the peripheral T-cell pool is depleted, T cells undergo homoeostatic expansion. This expansion is reliant on the recognition of self-antigens and/or cytokines, in particular interleukin-7. The T cell-intrinsic mechanisms that prevent excessive homoeostatic T-cell responses and consequent overt autoreactivity remain poorly defined. Here we show that protein tyrosine phosphatase N2 (PTPN2) is elevated in naive T cells leaving the thymus to restrict homoeostatic T-cell proliferation and prevent excess responses to self-antigens in the periphery. PTPN2-deficient CD8(+) T cells undergo rapid lymphopenia-induced proliferation (LIP) when transferred into lymphopenic hosts and acquire the characteristics of antigen-experienced effector T cells. The enhanced LIP is attributed to elevated T-cell receptor-dependent, but not interleukin-7-dependent responses, results in a skewed T-cell receptor repertoire and the development of autoimmunity. Our results identify a major mechanism by which homoeostatic T-cell responses are tuned to prevent the development of autoimmune and inflammatory disorders.