Mexico has higher mammalian diversity than expected for its size and geographic position. High environmental hetero geneity throughout Mexico is hypothesized to promote high turnover rates (β-diversity), thus contributing more to observed species richness and composition than within-habitat (α) diversity. This is true if species are strongly associated with their environments, such that changes in environmental attributes will result in changes in species composition. Also, greater heterogeneity in an area will result in greater species richness. This hypothesis has been deemed false for bats, as their ability to fly would reduce opportunities for habitat specialization. If so, we would expect no significant relationships between 1) species composition and environmental variables, 2) species richness and environmental heterogeneity, 3) β-diversity and environmental heterogeneity. We tested these predictions using 31 bat assemblages distributed across Mexico. Using variance partitioning we evaluated the relative contribution of vegetation, climate, elevation, horizontal heterogeneity (a variate including vegetation, climate, and elevational heterogeneity), spatial variation (lat-long), and vertical hetero geneity (of vegetation strata) to variation in bat species composition and richness. Variation in vegetation explained 92% of the variation in species composition and was correlated with all other variables examined, indicating that bats respond directly to habitat composition and structure. Beta-diversity and vegetational heterogeneity were significantly correlated. Bat species richness was significantly correlated with vertical, but not horizontal, heterogeneity. Nonetheless, neither horizontal nor vertical heterogeneity were random; both were related to latitude and to elevation. Variation in bat community composition and richness in Mexico were primarily explained by local landscape heterogeneity and environmental factors. Significant relationships between β-diversity and environmental variation reveal differences in habitat specialization by bats, and explain their high diversity in Mexico. Understanding mechanisms acting along environmental or geographic gradients is as important for understanding spatial variation in community composition as studying mechanisms that operate at local scales.