Research into proximate and ultimate mechanisms of individual cognitive variation in animal populations is a rapidly growing field that incorporates physiological, behavioural and evolutionary investigations. Recent studies in humans and laboratory animals have shown that the enteric microbial community plays a central role in brain function and development. The 'gut-brain axis' represents a multi-directional signalling system that encompasses neurological, immunological and hormonal pathways. In particular it is tightly linked with the hypothalamic-pituitary-adrenal axis (HPA), a system that regulates stress hormone release and influences brain development and function. Experimental examination of the microbiome through manipulation of diet, infection, stress and exercise, suggests direct effects on cognition, including learning and memory. However, our understanding of these processes in natural populations is extremely limited. Here, we outline how recent advances in predominantly laboratory-based microbiome research can be applied to understanding individual differences in cognition. Experimental manipulation of the microbiome across natal and adult environments will help to unravel the interplay between cognitive variation and the gut microbial community. Focus on individual variation in the gut microbiome and cognition in natural populations will reveal new insight into the environmental and evolutionary constraints that drive individual cognitive variation.This article is part of the theme issue 'Causes and consequences of individual differences in cognitive abilities'.