Ecological requirements and environmental conditions can influence diversification across temporal and spatial scales. Understanding the role of ecological niche evolution under phylogenetic contexts provides insights on speciation mechanisms and possible responses to future climatic change. Large‐scale phyloclimatic studies on the megadiverse Neotropics, where biomes with contrasting vegetation types occur in narrow contact, are rare. We integrate ecological and biogeographic data with phylogenetic comparative methods, to investigate the relative roles of biogeographic events and niche divergence and conservatism on the diversification of the lizard genus Kentropyx Spix, 1825 (Squamata: Teiidae), distributed in South American rainforests and savannas. Using five molecular markers, we estimated a dated species tree, which recovered three clades coincident with previously proposed species groups diverging during the mid‐Miocene. Biogeography reconstruction indicates a role of successive dispersal events from an ancestral range in the Brazilian Shield and western Amazonia. Ancestral reconstruction of climatic tolerances and niche overlap metrics indicates a trend of conservatism during the diversification of groups from the Amazon Basin and Guiana Shield, and a strong signal of niche divergence in the Brazilian Shield savannas. Our results suggest that climatic‐driven divergence at dynamic forest‐savanna borders might have resulted in adaptation to new environmental niches, promoting habitat shifts and shaping speciation patterns of Neotropical lizards. Dispersal and ecological divergence could have a more important role in Neotropical diversification than previously thought.