Prenatal adversity shapes child neurodevelopment and risk for later mental health problems. The quality of the early care environment can buffer some of the negative effects of prenatal adversity on child development. Retrospective studies, in adult samples, highlight epigenetic modifications as sentinel markers of the quality of the early care environment; however, comparable data from pediatric cohorts are lacking. Participants were drawn from the Maternal Adversity Vulnerability and Neurodevelopment (MAVAN) study, a longitudinal cohort with measures of infant attachment, infant development, and child mental health. Children provided buccal epithelial samples (mean age = 6.99, SD = 1.33 years, n = 226), which were used for analyses of genome-wide DNA methylation and genetic variation. We used a series of linear models to describe the association between infant attachment and (a) measures of child outcome and (b) DNA methylation across the genome. Paired genetic data was used to determine the genetic contribution to DNA methylation at attachment-associated sites. Infant attachment style was associated with infant cognitive development (Mental Development Index) and behavior (Behavior Rating Scale) assessed with the Bayley Scales of Infant Development at 36 months. Infant attachment style moderated the effects of prenatal adversity on Behavior Rating Scale scores at 36 months. Infant attachment was also significantly associated with a principal component that accounted for 11.9% of the variation in genome-wide DNA methylation. These effects were most apparent when comparing children with a secure versus a disorganized attachment style and most pronounced in females. The availability of paired genetic data revealed that DNA methylation at approximately half of all infant attachment-associated sites was best explained by considering both infant attachment and child genetic variation. This study provides further evidence that infant attachment can buffer some of the negative effects of early adversity on measures of infant behavior. We also highlight the interplay between infant attachment and child genotype in shaping variation in DNA methylation. Such findings provide preliminary evidence for a molecular signature of infant attachment and may help inform attachment-focused early intervention programs.