Despite compelling evidence for substantial individual differences in cognitive performance, it is unclear whether cognitive ability influences fitness of wild animals. In many animals, environmental stressors experienced in utero can produce substantial variation in the cognitive abilities of offspring. In reptiles, incubation temperatures experienced by embryos can influence hatchling brain function and learning ability. Under climate warming, the eggs of some lizard species may experience higher temperatures, which could affect the cognitive abilities of hatchlings. Whether such changes in cognitive abilities influence the survival of hatchlings is unknown. To determine whether incubation-induced changes in spatial learning ability affect hatchling survival, we incubated velvet gecko, Amalosia lesueurii, eggs using two fluctuating temperature regimes to mimic current (cold) versus future (hot) nest temperatures. We measured the spatial learning ability of hatchlings from each treatment, and released individually marked animals at two field sites in southeastern Australia. Hatchlings from hot-incubated eggs were slower learners than hatchlings from cold-incubated eggs. Survival analyses revealed that hatchlings with higher learning scores had higher survival than hatchlings with poor learning scores. Our results show that incubation temperature affects spatial learning ability in hatchling lizards, and that such changes can influence the survival of hatchlings in the wild.