Cognition is an essential tool for animals to deal with environmental challenges. Nonetheless, the ecological forces driving the evolution of cognition throughout the animal kingdom remain enigmatic. Large-scale comparative studies on multiple species and cognitive traits have been advanced as the best way to facilitate our understanding of cognitive evolution, but such studies are rare. Here, we tested 13 species of lacertid lizards (Reptilia: Lacertidae) using a battery of cognitive tests measuring inhibitory control, problem-solving, and spatial and reversal learning. Next, we tested the relationship between species' performance and (a) resource availability (temperature and precipitation), habitat complexity (Normalized Difference Vegetation Index), and habitat variability (seasonality) in their natural habitat and (b) their life history (size at hatching and maturity, clutch size, and frequency). Although species differed markedly in their cognitive abilities, such variation was mostly unrelated to their ecology and life history. Yet, species living in more variable environments exhibited lower behavioral flexibility, likely due to energetic constrains in such habitats. Our standardized protocols provide opportunities for collaborative research, allowing increased sample sizes and replication, essential for moving forward in the field of comparative cognition. Follow-up studies could include more detailed measures of habitat structure and look at other potential selective drivers such as predation.