PurposeStudies suggested autoimmunity plays a role in the etiology of obsessive–compulsive disorder (OCD). The purpose of this study was to determine if a history of systemic autoimmune diseases (SADs) is associated with an increased risk of subsequent onset of OCD.MethodsPatients with or without SADs were identified in the Taiwan National Health Insurance Program. The SADs cohort consisted of 63,165, while the comparison cohort consisted of 315,825 patients. The incidence rates of OCD with a maximum follow-up period of 10 years between patients with and without SADs were compared using a Cox proportional hazard model to estimate the hazard ratio (HR) and 95% confidence interval (95% CI).ResultsThe major finding was the discovery of a higher incidence of subsequent OCD among patients with SADs (HR: 1.85; 95% CI 1.41–2.43) after adjusted for other demographic characteristics. Specifically, the risk of OCD was observed to be significant increase in systemic lupus erythematosus (1.65, 1.07–2.54) dermatomyositis (3.25, 1.04–10.17), and Sjögren’s syndrome (2.38, 1.53–3.72). Also, this study revealed some potential risk factors for developing OCD, including younger age (less than or equal to 50-year-old) and some comorbidities (alcohol use disorder, liver cirrhosis, and malignancies). Conversely, this study found that steroid use was a potential protective factor for the development of OCD.ConclusionsThis study confirms that SADs are associated with higher incidence of OCD, suggesting that abnormal autoimmune process is associated with increased expression of psychiatric disturbances.