It is well established that adversities and GRIN2B (coding an N-methyl-D-aspartate receptor subunit) are independently associated with behavioral and cognitive impairments in childhood. However, a high proportion of children exposed to adversities have good, long-term outcomes. We hypothesized that among children exposed to adversities, GRIN2B variants would predict the worst cognitive and behavioral outcomes. 6 single nucleotide polymorphisms of GRIN2B were genotyped in 625 children aged 6-11 years from an Italian community-based sample. The interacting effect of GRIN2B variants with 4 measures of adversities [low socioeconomic status (SES), preterm delivery, maternal smoking during pregnancy, and absence of breastfeeding] was investigated upon blindly assessed cognitive abilities (vocabulary, block design, digit spans of Wechsler's Intelligence Scale, and Rey complex figure) and parents-rated behavioral problems (Child Behavior Checklist/6-18). Rs2268119 × SES interaction (Hotelling's Trace = 0.07; F(12,1154) = 3.53; p = 0.00004) influenced behavior, with more attention problems among children in the 'either A/T or T/T genotype and low SES' group, compared to all other groups. This interaction effect was not significant in an independent, replication sample of 475 subjects from an Italian community-based sample. GRIN2B variants predict children with the worst outcome in attention functioning among children exposed to low SES. Our findings, if replicated, could help in the identification of children with the highest risk and may prompt cost-effective preventive/treatment strategies.