Environmental heterogeneity is expected to increase the richness and diversity of species. The aim of this study is to identify environmental elements that influence the richness and diversity of small, medium and large species of mammals. For the sampling of mammals, camera and Sherman traps were used at 18 sampling stations. For vegetation sampling, eight large-scale explanatory variables were selected in a 1000 m² plot at each station. The diversity (H’) of habitats (heterogeneity) and species were measured using the Shannon–Wiener diversity index. To relate the heterogeneity and environmental variables with species richness for small, medium and large mammals, a generalised linear model (GLM) was used while considering the Poisson probability distribution. A multiple linear regression model was used for data with normal distributions. The results suggested that environmental elements could favour rodent richness but may have a negative effect on community evenness and some environmental variables that are related to the diversity of rodent species and the species richness of medium and large mammals. It was concluded that the relationship between environmental heterogeneity and mammal richness is complex and that the response to the biotic elements of the landscape is diverse and different for each species.