Purpose An emerging body of work suggests a link between childhood maltreatment and attention-deficit hyperactivity disorder (ADHD). However, research examining the role of maltreatment in the early course of the disorder lacks robust evidence from longitudinal studies. Our aim was to examine concurrent and prospective associations between maltreatment experiences and ADHD diagnosis and sex differences, and to estimate the association between repetitive maltreatment exposure and ADHD through childhood and adolescence. Methods Data were obtained from the Boricua Youth Study, a longitudinal study of 2480 children and adolescents of Puerto Rican background. Neglect, physical, emotional and sexual abuse, and foster placement were regressed on ADHD diagnosis measured at each of three waves using the Diagnostic Interview Schedule for Children-IV. Multilevel regressions estimated the effects of exposure on ADHD, adjusted by age, sex, income, household education, parental psychopathology, comorbidity and ADHD medication status. Results Emotional abuse and foster placement had robust associations with ADHD diagnosis. For girls, physical abuse had a threefold increase in the odds of having ADHD diagnosis; for boys, associations were observed only for emotional abuse. Prospective models examining the risk of ADHD following maltreatment provided initial evidence for the effects of physical abuse on ADHD, and a linear trend for repetitive exposure suggested increased probability for disorder persistence. Conclusions Associations between early maltreatment and ADHD were robust. Different categories of maltreatment increase the likelihood of ADHD for girls and boys. Increased exposure to maltreatment may predict symptom persistence. Interventions addressing ADHD must consider the effects of both sex and family environment.