Evidence suggests that the 7-repeat variant of a 48 base pair variable number tandem repeat polymorphism in the dopamine receptor D4 (DRD4) gene may be associated with the development of attention problems. A parallel literature suggests that genes linked to dopaminergic functioning may be associated with differential sensitivity to context, such that the direction of the genetic effect is hypothesized to vary across environmental experience. Guided by these literatures, we used data from the NICHD Study of Early Child Care and Youth Development to consider (a) whether individual differences in children's inattention problems across middle childhood are predicted by gene-environment interactions between the DRD4 gene 7-repeat polymorphism and children's experiences of maternal sensitivity across infancy and early childhood and (b) the degree to which such interactions are consistent with the differential-sensitivity model. Largely consistent with the hypothesized model, gene-environment interactions indicated that, in the context of insensitive early maternal care, the DRD4 7-repeat polymorphism was associated with higher levels of inattention. Although somewhat less consistently, there was also evidence that, in the context of highly sensitive care, the 7-repeat polymorphism was associated with lower levels of inattention. Overall, the magnitude of the absolute genetic effect increased over time, as children's inattention trajectories diverged.