Endophenotypes are heritable and quantifiable traits indexing genetic liability for a disorder. Here, we examined three potential endophenotypes, working memory function, response inhibition and reaction time variability, for attention-deficit hyperactivity disorder (ADHD) measured as a dimensional latent trait in a large general population sample derived from the Adolescent Brain and Cognition Developmental study. The genetic risk for ADHD was estimated using polygenic risk scores (PRS) whereas ADHD traits were quantified as a dimensional continuum using Bartlett factor score estimates, derived from Attention Problems items from the Child Behaviour Checklist and Effortful Control items from the Early Adolescent Temperament Questionnaire-Revised. The three candidate cognitive endophenotypes were quantified using task-based performance measures. Higher ADHD PRSs were associated with higher ADHD traits, as well as poorer working memory performance and increased reaction time variability. Lower working memory performance, poorer response inhibition, and increased reaction time variability were associated with more pronounced ADHD traits. Working memory and reaction time variability partially statistically mediated the relationship between ADHD PRS and ADHD traits, explaining 14% and 16% of the association, respectively. The mediation effect was specific to the genetic risk for ADHD and did not generalise to genetic risk for four other major psychiatric disorders. Together, these findings provide robust evidence from a large general population sample that working memory and reaction time variability can be considered endophenotypes for ADHD that mediate the relationship between ADHD PRS and ADHD traits.