Leaf-cutting ants are dominant herbivores in Neotropical rain forests, and their colony densities increase in disturbed habitats such as forest edges. However, while it is well-established that leaf-cutting ants profit from changes to the food-plant community, the phylogenetic dimension of this ant–plant interaction remains poorly understood in fragmented forests. We studied diet composition of Atta cephalotes in the edge and interior of Atlantic forest in north-east Brazil (8°30′S, 35°50′W). We applied phylogenetic signal analysis to investigate the diet across plant lineages and performed phylogenetic generalized linear models to analyse the diet in both habitats. We found a phylogenetic signal in diet and in leaf mechanical resistance, which means that A. cephalotes selects closely related food plants with less resistant leaves. Most preferred species belong to Malpighiales, Rubiaceae and Melastomataceae. We also found that irrespective of phylogeny, ants select food plants with less resistant leaves, both in edge and interior. However, ants choose more abundant plants only in edges. High abundance of optimal diet facilitates foraging in forest edges and explains why colony densities increase in disturbed habitats. Finally, by favouring or disfavouring specific clades, leaf-cutting ants contribute to changes in the phylogenetic structure of tropical rain forests, e.g. phylogenetic impoverishment.