Afforestation transforms the structure and functioning ability of an ecosystem. Converting a bare landscape through afforestation may have positive and negative consequences to the biodiversity. The study assessed the abundance and diversity of beetles in different selected habitats at the University of Dodoma, Tanzania. The habitats involved afforested areas with exotic trees of five years, three years, and eight months, as well as shrubland and grassland. Pitfall traps were established along the 10 transects of 100 meters each in the sampled plots to collect beetles. About 1031 beetles of 19 species were collected. Species richness was high in shrubland [Margalef's index (D) = 1.75, 10 species] and in afforested plots of five years (D = 1.62, 9 species), implying that areas with high vegetation cover might be suitable for beetles. Kruskal–Wallis showed a statistically significant difference among the five plots (H = 57.33, p = 0.03), with the highest abundance in shrubland (303 individuals). An afforested area was occupied by 608 beetles, equivalent to 59% of total abundance. According to the Shannon-Wiener index, shrubland had the most species diversity (H′ = 3.17) and an 8-month plantation had the least (0.61). The study also found that the species abundance, richness, and diversity were high in the 5-year old afforested plot. The difference in abundance was statistically significant in afforested areas (Kruskal-Wallis, H = 31.21, p = 0.01). The study recommends more research on the influence of plant species on beetle abundance and diversity to gain a better understanding of beetle functional diversity. • Increase in vegetation cover influenced coleopterans abundance and diversity. • Afforested area harbors high abundance of coleopterans. • Aging of plantation increased species abundance, richness and diversity of beetles.