A potential pathway underlying the association between prenatal exposure to maternal psychological problems and childhood externalizing problems is child self-regulation. This prospective study (N = 687) examined whether self-regulated compliance mediates the relation between maternal affective problems and hostility during pregnancy and childhood externalizing problems, and explored moderation by child polygenic risk scores for aggression and sex. Self-regulated compliance at age 3 was observed in mother–child interactions, and externalizing problems at age 6 were reported by mothers and teachers. Polygenic risk scores were calculated based on a genome-wide association study of aggressive behavior. Self-regulated compliance mediated the associations between maternal psychological problems and externalizing problems. Aggression PRS was associated with higher externalizing problems reported by mothers. No evidence was found of moderation by aggression PRS or sex. These findings support the hypothesis that maternal psychological problems during pregnancy might influence externalizing problems through early self-regulation, regardless of child genetic susceptibility or sex.