The current study is aimed at investigating the effect of edaphic factors on the distribution and abundance of ants in different habitats of the central areas of Iran, while considering the vegetation. During 2018 to 2019, 20 stations from four habitats, including deserts, mountainous and submontane, plains and rural areas and urban areas, were selected. In general, a total of 311 sample units were collected from all the stations, out of which, 32 species belonging to 13 genera, nine tribes and three subfamilies were identified. The biological distribution and abundance of species were argued by computing the physical and chemical parameters of the soil, such as salinity, pH, total nitrogen, organic carbon, calcium and vegetation. The present study has demonstrated that the calcium content significantly affects the species richness of ants, although the impact of this element on various genera is different. We found that increasing in the abundance and richness of plant species has a positive impact on the abundance and richness of ants. Our results also show that some genera are meaningfully adaptable to a variety of habitats. In Kahak station, which is an urban habitat, with enormous diversity, 14 species were found, while in Sadrabad Historic Karvansara, a desert habitat, only Cataglyphis lividus (André, 1881) was collected. Cataglyphis bellicosus (Karavaiev, 1924), as the most abundant species, collected from 12 stations, was the most dominant species.