IMPORTANCE Adverse childhood experiences (ACEs) are associated with long-term poor mental health. Less is known about factors that improve long-term mental health among those with ACEs. OBJECTIVE To evaluate, among those exposed to ACEs, whether team sports participation during adolescence is associated with better mental health in adulthood and whether the association between team sports participation and mental health varies by sex. DESIGN, SETTING, AND PARTICIPANTS This study used data from 9668 individuals who participated in waves 1 (1994-1995) and 4 (2008) of the National Longitudinal Study of Adolescent to Adult Health. Individuals were included if they had complete data on exposure to ACEs (physical and sexual abuse, emotional neglect, parental alcohol misuse, parental incarceration, and living with a single parent) and a valid sample weight. Statistical analysis was performed from November 6, 2017, to January 4, 2019. MAIN OUTCOMES AND MEASURES The association between team sports participation in grades 7 to 12 (wave 1) and diagnosis of depression and/or anxiety and current depressive symptoms (determined by Center for Epidemiologic Studies Depression scale-10 scores) at ages 24 to 32 years (wave 4) among individuals exposed to ACEs. Multivariable logistic regression models were weighted based on propensity scores for factors associated with team sports participation and controlled for individual, family, and school characteristics. Interaction terms tested whether associations between team sports participation and mental health varied by sex. RESULTS Of 9668 individuals included in the study (4470 male [50.0%]; mean [SD] age, 15.2 [1.75] years), 4888 (49.3%) reported 1 or more ACE and 2084 (21.3%) reported 2 or more ACEs. Among those with ACEs, team sports participation during adolescence was significantly associated with lower odds of receiving a diagnosis of depression (unadjusted rate, 16.8% vs 22.0%; propensity score-weighted [PSW] adjusted odds ratio [aOR], 0.76; 95% CI, 0.59-0.97) or anxiety (11.8% vs 16.8%; PSW aOR, 0.70; 95% CI, 0.56-0.89) and having current depressive symptoms (21.9% vs 27.5%; PSW aOR, 0.85; 95% CI, 0.71-1.01). There were no significant differences in associations between team sports participation and mental health by sex. Stratified analyses showed significant associations for all outcomes among males (depression: PSW aOR, 0.67 [95% CI, 0.46-0.99]; anxiety: PSW aOR, 0.66 [95% CI, 0.45-0.96]; depressive symptoms: PSW aOR, 0.75 [95% CI 0.56-0.99]) but only 1 outcome among females (anxiety: PSW aOR, 0.73; 95% CI, 0.54-0.98). CONCLUSIONS AND RELEVANCE Among individuals affected by ACEs, team sports participation in adolescence was associated with better adult mental health. Team sports may be an important and scalable resilience builder.