We investigated the distribution patterns of leaf mining insects along an elevational gradient in cerrado vegetation of southeastern Brazil. We tested four hypotheses related to the distribution of mining insects: (1) the “altitudinal gradient hypothesis,” which predicts that mining insect species richness will decrease with altitude or elevation; (2) the “habitat- mediated richness hypothesis,” which predicts that mining insect species richness will be higher in mesic habitats than in xeric habitats; (3) the “plant species richness hypothesis,” which predicts that mining insect species richness will be positively correlated with plant species richness; and (4) the “plant architecture hypothesis,” which predicts a positive correlation between mining insect species richness and plant structural complexity. A total of 33,000 herbs, 3520 shrubs, and 1760 trees were sampled at 44 sites across an elevational gradient of 700 m. Mining insect species richness and plant species richness showed a negative correlation with elevation in xeric habitats, while in mesic habitats mining insect species and plant species richness did not show any statistically significant relationship with elevation. The differential distribution of mining insect species between xeric and mesic habitats supported the habitat-mediated richness hypothesis, which states that miners would be more speciose in mesic, more favorable habitats. Mining species richness also increased with increasing plant structural complexity. The results suggest that the mining habit may not represent a strong adaptive strategy in protecting mining insects against desiccation.