Evolutionary thermal adaptation is increasingly being elucidated in a variety of systems. However, one of the most striking examples, temperature-dependent sex determination (TSD) in reptiles, has proven stubbornly difficult to decipher. Theoretical models suggest that selection on and heritable variation in thermal sensitivity of embryonic sex determination and maternal behavioural choice of thermal qualities of nest sites control the microevolutionary potential of TSD. To begin addressing this important issue, we conducted a multiyear field study of nesting behaviour in painted turtles (Chrysemys picta), which display TSD. We detected a significant field repeatability for overstory vegetation cover around nests at oviposition, a trait that is correlated inversely with nest temperature during embryonic sex determination and positively with offspring sex ratio (percentage of male). Neither clustered nesting nor individual spatial repeatability in nest site choice caused this striking pattern. Instead, females consistently preferred nest environments with particular quantities of overstory vegetation cover. These findings confirm a crucial assumption of models concerning the microevolution and adaptive significance of TSD in reptiles. The results also indicate that this system may be able to evolve via long-term maternal nesting behaviour in response to skewed sex ratios caused by environmental perturbations, such as gradual long-term climate change.