Hematopoietic PTPN2-deficiency promotes systemic inflammation and autoimmunity. PTPN2-deficiency enhances T cell and B cell responses. PTPN2 deficiency increases Tfh cell generation. PTPN2 deficiency promotes IL-21-induced STAT3 signalling in B cells and Tfh cells.