Ecological research often assumes that species are adapted to their current climatic environments. However, climate fluctuations over geologic time scales have influenced species dispersal and extinction, which in turn may affect community structure. Modern community structure is likely to be the product of both palaeoclimate and modern climate, with the relative degrees of influence of past and present climates unknown. Here, we assessed the influence of climate at different time periods on the phylogenetic and functional trait structure of 203 African mammal communities. We found that the climate of the mid-Holocene (approx. 6,000 years ago) and Last Glacial Maximum (approx. 22 000 years ago) were frequently better predictors of community structure than modern climate for mammals overall, carnivorans and ungulates. Primate communities were more strongly influenced by modern climate than palaeoclimate. Overall, community structure of African mammals appears to be related to the ecological flexibility of the groups considered here and the regions of continental Africa that they occupy. Our results indicate that the future redistribution, expansion and contraction of particular biomes due to human activity, such as climate and land-use change, will differentially affect mammal groups that vary in their sensitivity to environmental change.