Bipolar disorder is associated with cognitive deficits and cortical changes for which the developmental dynamics are not well understood. The dopamine D2 receptor (DRD2) gene has been associated with both psychiatric disorders and cognitive variability. Here we examined the mediating role of brain structure in the relationship between DRD2 genomic variation and cognitive performance, with target cortical regions selected based on evidence of association with DRD2, bipolar disorder and/or cognition from prior literature. Participants (n = 143) were aged 12-30 years and comprised 62 first-degree relatives of bipolar patients (deemed ‘at-risk’), 55 controls, and 26 patients with established bipolar disorder; all were unrelated Caucasian individuals with complete data across the three required modalities (structural magnetic resonance imaging, neuropsychological and genetic data). A DRD2 haplotype was derived from three functional polymorphisms (rs1800497, rs1076560, rs2283265) associated with alternative splicing (i.e., D2-short/-long isoforms). Moderated mediation analyses explored group differences in relationships between this DRD2 haplotype, three structural brain networks which subsume the identified cortical regions of interest (frontoparietal, dorsal-attention, and ventral-attention), and three cognitive indices (intelligence, attention, and immediate memory). Controls who were homozygous for the DRD2 major haplotype demonstrated greater cognitive performance as a result of dorsal-attention network mediation. However, this association was absent in the ‘at-risk’ group. This study provides the first evidence of a functional DRD2-brain-cognition pathway. The absence of typical brain-cognition relationships in young ‘at-risk’ individuals may reflect biological differences that precede illness onset. Further insight into early pathogenic processes may facilitate targeted early interventions.