Dopamine transmission in the prefrontal cortex (PFC) supports working memory (WM), the temporary holding, processing and manipulation of information in one's mind. The gene coding the catechol-O-methyltransferase (COMT) enzyme, which degrades dopamine, in particular in the PFC, has a common single nucleotide polymorphism leading to two versions of the COMT enzyme which vary in their enzymatic activity. The methionine (Met) allele has been associated with higher WM performance and lower activation of the PFC in executive function tasks than the valine (Val) allele. In a previous study, COMT genotype was associated with performance on verbal and visuospatial WM tasks in adults, as well as with performance on a novel social WM paradigm that requires participants to maintain and manipulate information about the traits of their friends or family over a delay. Here, data collected in children and adolescents (N = 202) were compared to data from the adult sample (N = 131) to investigate possible age differences in genetic associations. Our results replicate and extend previous work showing that the pattern of superior WM performance observed in Met/Met adults emerges during development. These findings are consistent with a decrease in prefrontal dopamine levels during adolescence. Developmentally moderated genetic effects were observed for both visuospatial and social WM, even when controlling for non-social WM performance, suggesting that the maintenance and manipulation of social information may also recruit the dopamine neurotransmitter system. These findings show that development should be considered when trying to understand the impact of genetic polymorphisms on cognitive function. © 2019 The Authors. Developmental Science published by John Wiley & Sons Ltd.