The role of climate change in the evolution and diversification of hominoids remains a hotly debated issue. Stable isotope analyses of fossil mammals that coexisted with the hominoids can provide insights into hominoid palaeoenvironments and shed light on this debate. Here, we report results of stable carbon and oxygen isotope analyses of tooth enamel samples from a variety of Pleistocene mammals including pandas, deer, elephants, pigs, rhinos, and bovids from two hominoid fossil localities (Yugong Cave and Baxian Cave) in South China. Enamel δ13C values indicate that most of the mammals living in the study area during the late Middle Pleistocene had C3-based diets but a small number of individuals consumed some C4 grasses. This indicates the presence of C4 plants in the region during the late Middle Pleistocene, most likely in patches of open areas in a predominantly forested environment. However, during the early Late Pleistocene, all of the mammals examined had C3-based diets, except one bovid and one panda that may have ingested small amounts of C4 plants. This indicates a dense forested environment with little C4 grasses during the early Late Pleistocene. Like the Early Pleistocene pygmy panda (Ailuropoda microta) from Yanliang Cave, the late Middle Pleistocene Ailuropoda baconi from Yugong Cave and the early Late Pleistocene Ailuropoda melanoleuca from Baxian Cave had higher mean diet-δ13C values than other co-occurring herbivores, indicating they preferred relatively open forest habitats and had more restricted diets compared to other mammals. The reconstructed mean paleo-meteoric water δ18Ow values are lower than the annual average δ18Ow value of modern precipitation in the region, suggesting that the climatic conditions during the times when these Pleistocene mammals were alive were colder and/or wetter than today. In addition, δ18O values of the obligate drinkers (pigs, rhinos, bovids) display an overall decreasing trend, accompanied by increased range of δ18O variations, from the Early Pleistocene to the early Late Pleistocene. This suggests that the regional climate became colder and/or wetter, with increased seasonality, from the Early Pleistocene to the early Late Pleistocene, likely related to intensified glaciation. The change in climate to colder conditions may be responsible for the extinction of the Gigantopithecus in this region.