Aging is the primary risk factor for cognitive decline, an emerging health threat to aging societies worldwide. Whether anti-aging factors such as klotho can counteract cognitive decline is unknown. We show that a lifespan-extending variant of the human KLOTHO gene, KL-VS, is associated with enhanced cognition in heterozygous carriers. Because this allele increased klotho levels in serum, we analyzed transgenic mice with systemic overexpression of klotho. They performed better than controls in multiple tests of learning and memory. Elevating klotho in mice also enhanced long-term potentiation, a form of synaptic plasticity, and enriched synaptic GluN2B, an N-methyl-D-aspartate receptor (NMDAR) subunit with key functions in learning and memory. Blockade of GluN2B abolished klotho-mediated effects. Surprisingly, klotho effects were evident also in young mice and did not correlate with age in humans, suggesting independence from the aging process. Augmenting klotho or its effects may enhance cognition and counteract cognitive deficits at different life stages.