Background Fever and infections are common events during pregnancy, and have been shown to be associated with neurodevelopmental impairment in the offspring. The evidence in relation to attention deficit/hyperactivity disorder (ADHD) is, however, nonexistent for fever and limited for infections. The aim of this study was therefore to investigate the impact of these exposures on the occurrence of ADHD in the offspring, considering gestational timing as well as intensity of exposure. Methods The study was conducted within the Danish National Birth Cohort, using data on 89,146 pregnancies enrolled during 1996-2002. Exposure to fever and infections were assessed prospectively in two computer-assisted telephone interviews during pregnancy and ADHD status in the child was determined using registry information from three nation-wide patient and prescription registers. Stratified Cox regressions were used to calculate adjusted hazard ratios of ADHD occurrence. Results The analyses revealed no overall association between maternal exposure to fever or infections and ADHD in the offspring [adjusted hazard ratio (AHR): 1.03, 95% confidence interval (CI): 0.93-1.13 and aHR: 1.01, 95% CI: 0.92-1.11]. When the exposures were considered during specific gestational periods, increased rates of ADHD were observed following fever in gestational weeks 9-12 (aHR: 1.33, 95% CI: 1.12-1.58), and genitourinary infections in weeks 33-36 (aHR: 1.60, 95% CI: 1.13-2.26). Conclusions Although no overall adverse association between fever and infections in pregnancy and ADHD in the offspring was found, the analyses indicated that exposures during specific time windows of the pregnancy could be associated with increased ADHD occurrence.