Variation in the klotho gene is linked to differences in health outcomes: klotho allele KL-VS heterozygosity is associated with longevity, better cognition and greater right frontal grey matter volume in late life. Contradicting reports, however, suggest that KL-VS's effect on health might be age-dependent. Here we examine the relationship between KL-VS genotype, cognition and brain structure in childhood and adolescence. We hypothesized that KL-VS has early influences on cognitive and brain development. We investigated the associations of KL-VS carrier status with cognition and brain morphology in a cohort of 1387 children and adolescents aged 3-21 years, examining main effects and interactions between age, sex and socioeconomic circumstance. KL-VS had no main effect on either cognition or brain structure, though there was a significant KL-VS × age interaction for cognition (specifically executive function, attention, episodic memory, and general cognition), total grey matter and total brain volume. KL-VS heterozygotes had better cognition than non-carriers before age 11, but lower cognition after age 11. Heterozygotes had smaller brains than non-carriers did in early childhood. Sex moderated the association between KL-VS and white matter volume. Among girls, KL-VS heterozygotes had smaller white matter volumes than non-carriers. Among boys, heterozygotes had greater white matter volumes than non-carriers. However, a replication in a cohort of 2306 children aged 6-12 years showed no significant associations. In contrast to findings in late life, these results show that KL-VS does not have a main effect on cognition and brain structure. Furthermore, KL-VS's influence may depend on age and sex.