Personality traits are heritable and respond to natural selection, but are at the same time influenced by the ontogenetic environment. Epigenetic effects, such as DNA methylation, have been proposed as a key mechanism to control personality variation. However, to date little is known about the contribution of epigenetic effects to natural variation in behaviour. Here, we show that great tit (Parus major) lines artificially selected for divergent exploratory behaviour for four generations differ in their DNA methylation levels at the dopamine receptor D4 (DRD4) gene. This D4 receptor is statistically associated with personality traits in both humans and nonhuman animals, including the great tit. Previous work in this songbird failed to detect functional genetic polymorphisms within DRD4 that could account for the gene–trait association. However, our observation supports the idea that DRD4 is functionally involved in exploratory behaviour but that its effects are mediated by DNA methylation. While the exact mechanism underlying the transgenerational consistency of DRD4 methylation remains to be elucidated, this study shows that epigenetic mechanisms are involved in shaping natural variation in personality traits. We outline how this first finding provides a basis for investigating the epigenetic contribution to personality traits in natural systems and its subsequent role for understanding the ecology and evolution of behavioural consistency.