© 2017 Macmillan Publishers Limited, part of Springer Nature. All rights reserved. Methylphenidate (MPH) is the most frequently used pharmacological treatment in children with attention-deficit/hyperactivity disorder. However, a considerable interindividual variability exists in clinical outcome, which may reflect underlying genetic influences. We analyzed 57 single-nucleotide polymorphisms in 9 dopamine-related candidate genes (TH, DBH, COMT, DAT1 and DRD1-5) as potential predictors of MPH efficacy and tolerability, and we considered prenatal and perinatal risk factors as environmental hazards that may influence treatment effects in a gene-by-environment analysis. Our results provide evidence for the contribution of DRD3 (P=0.041; odds ratio (OR)=4.00), DBH (P=0.032; OR=2.85), TH (P=5.5e-03; OR=4.34) and prenatal smoking (P=1.7e-03; OR=5.10) to the clinical efficacy of MPH, with a higher risk for treatment failure in genetically susceptible subjects whose mother smoked during pregnancy. Adverse events after MPH treatment were significantly associated with variation in DBH (P=6.4e-03; OR=0.28) and DRD2 (P=0.047; OR=3.76). This study suggests that the dopaminergic system together with prenatal smoking exposure may moderate MPH treatment effects.