The peer environment is among the most important factors for children’s behavioral development. However, not all children are equally influenced by their peers, which is potentially due to their genetic make-up. The dopamine receptor D4 gene (DRD4) is a potential candidate gene that may influence children’s susceptibility to the peer environment. In the present study, we explored whether variations in the DRD4 gene moderated the association between children’s social standing in the peer group (i.e., social preference among classmates) with subsequent conduct problems and prosocial behavior among 405 (51 % females) elementary school children followed annually throughout early adolescence (ages 9–12 years). The behavioral development of children with and without the DRD4 7-repeat allele was compared. The results indicated that children who had higher positive social preference scores (i.e., who were more liked relative to disliked by their peers) showed less conduct problem development in subsequent years relative to children who had lower positive social preference scores. In contrast, children who had more negative preference scores (i.e., who were more disliked relative to liked among peers) showed more conduct problem development in subsequent years, relative to children who had less negative preference scores. However, these effects only occurred when children had a 7-repeat allele. For children who did not have a 7-repeat allele, the level of social preference was not associated with subsequent conduct problems. No evidence for gene–environment interaction effects for prosocial behavior was found. The implications for our understanding of conduct problem development and its prevention are discussed.