African forest-savannah mosaics are complex landscapes holding mixtures of woody grasslands (savannah) and different forest systems (gallery forests and forest islands). In these landscapes, ants are highly diverse and perform essential ecosystem services, however, the assembly of ant communities in African forest-savannah mosaics is poorly understood. Here we showed the diversity and species overlap of ant communities in three habitats of the West African savannah and quantified the contribution of thermal tolerances and trophic ecology to community assembly. We investigated ant diversity in the West African Comoé National Park (Côte d'Ivoire) at 16 sites of three habitat types within a forest-savannah mosaic: continuous gallery forest, isolated forest islands and savannah. Across all sites, we collected a total of 91 species from 35 genera from three strata: trees, leaf litter, and soil. Additionally, we assessed differences in functional traits (trophic groups and thermal tolerance) between habitat types and strata. Though species richness was similar in all three habitats, there was a clear separation in species assemblages and functional traits between the two forest habitats and the savannah. Species assemblage shifts were primarily due to species turnover between savannah and forest habitats. In addition, the turnover in species assemblages from forests to savannah habitats was associated with a change in the thermal tolerance of species and in the proportion of trophobionts and predators. Forest and savannah habitats support distinct ant communities with different functional traits and contribute additively to the landscape-scale diversity of the West African ant fauna. Land-use and park management should focus on conserving both savannah and forest sites in tropical protected areas such as the Comoé National Park.