-Ecological theory of habitat heterogeneity and limited niche-similarity assumes that more heterogeneous environments provide a greater amount and diversity of resources than simple environments, resulting in a greater diversity of species. This study aimed to evaluate the effect of the habitat heterogeneity on the richness of dung beetles and to examine the spatial patterns of assemblage structure in relation to patterns of habitat heterogeneity. Dung beetles were collected using pitfall traps without bait in 30 points distributed in an area of cerrado sensu lato, in the region of Tangará da Serra, MT, Brazil, including areas of cerrado sensu stricto, campo sujo, cerradão and gallery forest. A total of 1,291 dung beetles were collected, distributed in 16 genera and 29 species. Overall habitat heterogeneity exerted a negative effect on patterns of dung beetles richness. Higher levels of species richness were observed in areas of cerrado campo sujo, while the areas of gallery forest were the most species poor. Regarding assembly structure, it was found that the dung beetles were separated into two major groups, one formed by the presence of specialized species in forest areas and other composed of species that occurred predominantly in cerrado. In conclusion, it was found that habitat complexity infl uenced the distribution of dung beetles, but the level of turnover in species composition along the heterogeneity gradient was relatively weak.