Psychiatric reactions to life stressors are common in the general population and may result in immune dysfunction. Whether such reactions contribute to the risk of autoimmune disease remains unclear. OBJECTIVE To determine whether there is an association between stress-related disorders and subsequent autoimmune disease. DESIGN, SETTING, AND PARTICIPANTS Population-and sibling-matched retrospective cohort study conducted in Sweden from January 1, 1981, to December 31, 2013. The cohort included 106 464 exposed patients with stress-related disorders, with 1 064 640 matched unexposed persons and 126 652 full siblings of these patients. EXPOSURES Diagnosis of stress-related disorders, ie, posttraumatic stress disorder, acute stress reaction, adjustment disorder, and other stress reactions. MAIN OUTCOMES AND MEASURES Stress-related disorder and autoimmune diseases were identified through the National Patient Register. The Cox model was used to estimate hazard ratios (HRs) with 95% CIs of 41 autoimmune diseases beyond 1 year after the diagnosis of stress-related disorders, controlling for multiple risk factors. RESULTS The median age at diagnosis of stress-related disorders was 41 years (interquartile range, 33-50 years) and 40% of the exposed patients were male. During a mean follow-up of 10 years, the incidence rate of autoimmune diseases was 9.1, 6.0, and 6.5 per 1000 person-years among the exposed, matched unexposed, and sibling cohorts, respectively (absolute rate difference, 3.12 [95% CI, 2.99-3.25] and 2.49 [95% CI, 2.23-2.76] per 1000 person-years compared with the population-and sibling-based reference groups, respectively). Compared with the unexposed population, patients with stress-related disorders were at increased risk of autoimmune disease (HR, 1.36 [95% CI, 1.33-1.40]). The HRs for patients with posttraumatic stress disorder were 1.46 (95% CI, 1.32-1.61) for any and 2.29 (95% CI, 1.72-3.04) for multiple (Ն3) autoimmune diseases. These associations were consistent in the sibling-based comparison. Relative risk elevations were more pronounced among younger patients (HR, 1.48 [95% CI, 1.42-1.55]; 1.41 [95% CI, 1.33-1.48]; 1.31 [95% CI, 1.24-1.37]; and 1.23 [95% CI, 1.17-1.30] for age at Յ33, 34-41, 42-50, and Ն51 years, respectively; P for interaction < .001). Persistent use of selective serotonin reuptake inhibitors during the first year of posttraumatic stress disorder diagnosis was associated with attenuated relative risk of autoimmune disease (HR, 3.64 [95% CI, 2.00-6.62]; 2.65 [95% CI, 1.57-4.45]; and 1.82 [95% CI, 1.09-3.02] for duration Յ179, 180-319, and Ն320 days, respectively; P for trend = .03). CONCLUSIONS AND RELEVANCE In this Swedish cohort, exposure to a stress-related disorder was significantly associated with increased risk of subsequent autoimmune disease, compared with matched unexposed individuals and with full siblings. Further studies are needed to better understand the underlying mechanisms.