Heritable personality variation is subject to fluctuating selection in many animal taxa; a major unresolved question is why this is the case. A parsimonious explanation must involve a general ecological process: a likely candidate is the omnipresent spatiotemporal variation in conspecific density. We tested whether spatiotemporal variation in density within and among nest box plots of great tits (Parus major) predicted variation in selection acting on exploratory behaviour (n = 48 episodes of selection). We found viability selection favouring faster explorers under lower densities but slower explorers under higher densities. Temporal variation in local density represented the primary factor explaining personality-related variation in viability selection. Importantly, birds did not anticipate changes in selection by means of adaptive density-dependent plasticity. This study thereby provides an unprecedented example of the key importance of the interplay between fluctuating selection and lack of adaptive behavioural plasticity in maintaining animal personality variation in the wild.