Maternal prenatal anxiety is an important risk factor for altered child neurodevelopment but there is uncertainty concerning the biological mechanisms involved and sources of individual differences in children's responses. We sought to determine the role of functional genetic variation in COMT, which encodes catechol-O-methyltransferase, in the association between maternal prenatal anxiety and child symptoms of ADHD and working memory. We used the prospectively-designed ALSPAC cohort (n = 6,969) for our primary data analyses followed by replication analyses in the PREDO cohort (n = 425). Maternal prenatal anxiety was based on self-report measures; child symptoms of ADHD were collected from 4-15 years of age; working memory was assessed from in-person testing at age 8 years; and genetic variation in COMT at rs4680 was determined in both mothers and children. The association between maternal prenatal anxiety and child attention/hyperactivity symptoms and working memory was moderated by the child's rs4680 genotype, with stronger effects obtained for the val/val (G:G) genotype relative to val/met (A:G) (all p<0.01) and met/met (A:A) groups (all p<0.05). Similar findings were observed in the PREDO cohort where maternal prenatal anxiety interacted with child rs4680 to predict symptoms of ADHD at 3.5 years of age. The findings, from two cohorts, show a robust gene-environment interaction, which may contribute to inter-individual differences in the effects of maternal prenatal anxiety on developmental outcomes from childhood to mid-adolescence.