Prenatal alcohol exposure (PAE) is known to elicit a broad range of systemic effects, including neurophysiological alterations that result in adverse behavioral and cognitive outcomes. However, molecular pathways underlying these long-term intrauterine effects remain to be investigated. Here, we tested a hypothesis that PAE may lead to epigenetic alterations to the DNA resulting in attentional and cognitive alterations of the children. We report the results of the study that included 156 primary school children of the Franconian Cognition and Emotion Studies (FRANCES) cohort which were tested for an objective marker of PAE, ethyl glucuronide (EtG) in meconium at birth. Thirty-two newborns were found to be exposed to alcohol with EtG values above 30 ng/g (EtG+). Previously we described PAE being associated with lower IQ and smaller amplitude of the event-related potential component P3 in go trials (Go-P3), which indicates a reduced capacity of attentional resources. Whole-genome methylation analysis of the buccal cell DNA revealed 193 differentially methylated genes in children with positive meconium EtG, that were clustered into groups involved in epigenetic modifications, neurodegeneration, neurodevelopment, axon guidance and neuronal excitability. Furthermore, we detected mediation effects of the methylation changes in and genes on the EtG related cognitive and attention-related deficits. Our results suggest that system-wide epigenetic changes are involved in long-term effects of PAE. In particular, we show an epigenetic mediation of PAE effects on cognition and attention-related processes.