PTPN22 encodes a tyrosine phosphatase that is expressed by haematopoietic cells and functions as a key regulator of immune homeostasis by inhibiting T-cell receptor signalling and by selectively promoting type I interferon responses after activation of myeloid-cell pattern-recognition receptors. A single nucleotide polymorphism of PTPN22, 1858C>T (rs2476601), disrupts an interaction motif in the protein, and is the most important non-HLA genetic risk factor for rheumatoid arthritis and the second most important for juvenile idiopathic arthritis. PTPN22 exemplifies a shared autoimmunity gene, affecting the pathogenesis of systemic lupus erythematosus, vasculitis and other autoimmune diseases. In this Review, we explore the role of PTPN22 in autoimmune connective tissue disease, with particular emphasis on candidate-gene and genome-wide association studies and clinical variability of disease. We also propose a number of PTPN22-dependent functional models of the pathogenesis of autoimmune diseases.