Prenatal exposure to air pollution increases the risk for psychiatric disorders characterized by internalizing problems. In this study, we examined the roles of shyness and anterior cingulate cortex (ACC) activity in the association between prenatal exposure to polycyclic aromatic hydrocarbons (PAH) and children's internalizing problems at 7-9 years old. Participants include 53 children (31 girls, 22 boys). Personal air monitoring was conducted over 48 continuous hours during the third trimester of pregnancy to measure 8 PAHs. Mothers reported children's shyness (Emotionality Activity Sociability Temperament Survey) at age 5 and internalizing problems (Child Behavior Checklist) at ages 7-9. ACC activity was measured by fMRI during the Simon Spatial Incompatibility task at ages 7-9. Shyness mediated the association between prenatal PAH exposure and internalizing problems. Higher prenatal PAH exposure predicted increased shyness, which in turn predicted greater internalizing problems. Moreover, left ACC activity during the Simon task moderated the association between prenatal PAH exposure and internalizing problems. Prenatal PAH exposure predicted increased risk for internalizing problems only when children showed heightened left ACC activity during the resolution of cognitive conflict. Our study innovatively synthesizes the fields of developmental psychology and environmental health science to offer new insights into the risk factors for anxiety disorders. Facilitating the development of healthy reactive and regulatory processes may improve the developmental outcomes for children highly exposed to air pollution.