Objective: To examine gender differences in the association between attention-deficit/hyperactivity disorder (ADHD) and substance use disorder (SUD), and to explore the impact of comorbid psychiatric conditions.Method: This was a cohort study of all children born in Denmark in 1990-2003 (n=729,560). By record linkage across nationwide registers, we merged data on birth characteristics, socioeconomic status, familial psychiatric history, and diagnoses of ADHD, comorbidities, and SUD. Hazard ratios (HR) with 95% CIs were estimated by Cox regression and adjusted for a range of variables.Results: ADHD increased the risk of alcohol abuse (HRfemales=1.72 [1.42-2.08], HRmales=1.57 [1.37-1.79]), cannabis abuse (HRfemales=2.72 [2.12-3.47], HRmales=2.24 [1.86-2.70]) and other illicit substance abuse (HRfemales=2.05 [1.54-2.73], HRmales=2.42 [1.98-2.96]), compared to individuals without ADHD. In the overall estimates, no gender differences were found. Among individuals with ADHD without comorbidities, females had higher SUD risk than males, as did females with ADHD and conduct disorder (CD). Comorbid CD, depression, bipolar disorder, and schizophrenia further increased the risk of SUD in ADHD, compared to non-ADHD. Autism spectrum disorder in males with ADHD lowered the SUD risk.Conclusion: ADHD increased the risk of all SUD outcomes. Individuals with ADHD without comorbidities were also at increased risk and some comorbid disorders further increased the risk. Females and males with ADHD had comparable risks of SUD, although females had higher risk of some SUDs than males. Females with ADHD may be perceived as less impaired than males, but they are at equally increased risk of SUD.