Refugees are at higher risk of some psychiatric disorders, including post-traumatic stress disorder (PTSD) and psychosis, compared with other non-refugee migrants and the majority population. However, it is unclear whether this also applies to substance use disorders, which we investigated in a national register cohort study in Sweden. We also investigated whether risk varied by region of origin, age at migration, time in Sweden, and diagnosis of PTSD. Using linked Swedish register data, we followed a cohort born between 1984 and 1997 from their 14th birthday or arrival in Sweden, if later, until an International Classification of Diseases, 10th revision (ICD-10), diagnosis of substance use disorder (codes F10.X-19.X), emigration, death, or end of follow-up (31 December 2016). Refugee and non-refugee migrants were restricted to those from regions with at least 1,000 refugees in the Swedish registers. We used Cox proportional hazards regression to estimate unadjusted and adjusted hazard ratios (aHRs) and 95% confidence intervals (CIs) in refugee and non-refugee migrants, compared with Swedish-born individuals, for all substance use disorders (F10.X-19.X), alcohol use disorders (F10.X), cannabis use disorders (F12.X), and polydrug use disorders (F19.X). In adjusted analyses, we controlled for age, sex, birth year, family income, family employment status, population density, and PTSD diagnosis. Our sample of 1,241,901 participants included 17,783 (1.4%) refugee and 104,250 (8.4%) non-refugee migrants. Refugees' regions of origin were represented in proportions ranging from 6.0% (Eastern Europe and Russia) to 41.4% (Middle East and North Africa); proportions of non-refugee migrants' regions of origin ranged from 11.8% (sub-Saharan Africa) to 33.7% (Middle East and North Africa). These groups were more economically disadvantaged at cohort entry (p < 0.001) than the Swedish-born population. Refugee (aHR: 0.52; 95% CI 0.46-0.60) and non-refugee (aHR: 0.46; 95% CI 0.43-0.49) migrants had similarly lower rates of all substance use disorders compared with Swedish-born individuals (crude incidence: 290.2 cases per 100,000 person-years; 95% CI 287.3-293.1). Rates of substance use disorders in migrants converged to the Swedish-born rate over time, indicated by both earlier age at migration and longer time in Sweden. We observed similar patterns for alcohol and polydrug use disorders, separately, although differences in cannabis use were less marked; findings did not differ substantially by migrants' region of origin. Finally, while a PTSD diagnosis was over 5 times more common in refugees than the Swedish-born population, it was more strongly associated with increased rates of substance use disorders in the Swedish-born population (aHR: 7.36; 95% CI 6.79-7.96) than non-refugee migrants (HR: 4.88; 95% CI 3.71-6.41; likelihood ratio test [LRT]: p = 0.01). The main limitations of our study were possible non-differential or differential under-ascertainment (by migrant status) of those only seen via primary care and that our findings may not generalize to undocumented migrants, who were not part of this study. Our findings suggest that lower rates of substance use disorders in migrants and refugees may reflect prevalent behaviors with respect to substance use in migrants' countries of origin, although this effect appeared to diminish over time in Sweden, with rates converging towards the substantial burden of substance use morbidity we observed in the Swedish-born population.