Despite the long-standing interest in the organization of ant communities across elevational gradients, few studies have incorporated the evolutionary information to understand the historical processes that underlay such patterns. Through the evaluation of phylogenetic alpha and beta-diversity, we analyzed the structure of leaf-litter ant communities along the Cofre de Perote mountain in Mexico and evaluated whether deterministic- (i.e., habitat filtering, interspecific competition) or stochastic-driven processes (i.e., dispersal limitation) were driving the observed patterns. Lowland and some highland sites showed phylogenetic clustering, whereas intermediate elevations and the highest site presented phylogenetic overdispersion. We infer that strong environmental constraints found at the bottom and the top elevations are favoring closely-related species to prevail at those elevations. Conversely, less stressful climatic conditions at intermediate elevations suggest interspecific interactions are more important in these environments. Total phylogenetic dissimilarity was driven by the turnover component, indicating that the turnover of ant species along the mountain is actually shifts of lineages adapted to particular locations resembling their ancestral niche. The greater phylogenetic dissimilarity between communities was related to greater temperature differences probably due to narrow thermal tolerances inherent to several ant lineages that evolved in more stable conditions. Our results suggest that the interplay between environmental filtering, interspecific competition and habitat specialization plays an important role in the assembly of leaf-litter ant communities along elevational gradients.