The predisposition of individuals to several common autoimmune diseases, such as rheumatoid arthritis, systemic lupus erythematosus and multiple sclerosis, is genetically linked to certain human MHC class II molecules and other immune modulators. However, genetic predisposition is only one risk factor for the development of these diseases, and low concordance rates in monozygotic twins, as well as the geographical distribution of disease risk, suggest the involvement of environmental factors in the development of these diseases. Among these environmental factors, infections have been implicated in the onset and/or promotion of autoimmunity. In this Review, we outline the mechanisms by which viral infection can trigger autoimmune disease and describe the pathways by which infection and immune control of infectious disease might be dysregulated during autoimmunity.