The organization of ant communities can be affected by vegetation characteristics and by interspecific interactions. We evaluated the roles of vegetation complexity/heterogeneity and interspecific interactions on the organization of ant communities in two contrasting habitats. A total of 25 species of ants were collected in pitfall traps in the Cerrado (13 species) and in the Atlantic forest (22 species). Beta diversity (Dβ) was higher among Atlantic forest trees and the plant height positively affected the richness of ants. Greater Dβ in the Atlantic forest environment could be explained by the greater complexity of the vegetation in this environment. Co-occurrence analyses have shown that interspecific interactions are more important in shaping ant community organization in the Cerrado than in the Atlantic Forest. Low availability of resources can generate interspecific competition and competitive exclusion. Thus, the variation in resource availability could explain the results of the co-occurrence analyses. Finally, the importance of resource availability for the conservation of ant diversity is discussed.