Local land-use intensity and surrounding landscape complexity affect the diversity of local species. Ants are an important biocontrol agent of the coffee berry borer (CBB), the main coffee pest worldwide. Although intensification of coffee production and deforestation in the surrounding landscape may reduce ant diversity, α- and β-diversity patterns of ants in coffee landscapes remain poorly understood. Ants foraging in coffee bushes were sampled, using tuna baits along an agricultural intensification gradient (forest, shaded coffee and sun coffee) in a Neotropical coffee landscape. We evaluated the differences in α and β components of ant richness, community differentiation and habitat specificity of ant communities, in response to land-use type and the percentage of surrounding forest. We found that ant β-diversity and community differentiation among plots were significantly reduced with coffee management intensity. The amount of forest border adjacent to coffee plantations did not affect α- or β-diversity. Yet, ant habitat specificity in the forest increased with plots having greater amounts of forest border, although in sun coffee plantations, the opposite was found: plots with greater forest border decreased habitat specificity. We found that conserving forest at landscape scales enhanced β-diversity, community differentiation and habitat specificity of ants in the forest. Loss of forest cover at landscape scales (i.e. predominance of sun coffee) may lead to biotic homogenisation of ant communities. In conclusion, landscape-wide ant richness is important in terms of biological CBB control by conservation.