The paleoenvironments and ecosystems of northern China during the Miocene are complex topics, especially concerning the impact of the uplift of the Tibetan Plateau on the surrounding areas and the ecological adaptations of mammals. Our analyses using stable carbon and oxygen isotope analysis, cenograms, and hypsodonty of herbivorous mammals reveal open, arid, savanna-like habitats in the Junggar Basin during the middle Miocene, which subsequently spread to northern China by the late Middle Miocene. Large herbivores, particularly proboscideans and rhinocerotids, exhibited strong adaptations to these open environments. However, smaller taxa maintained a preference for more closed, forested areas. Despite global climate events, faunal diets in the Junggar Basin remained consistent, although biodiversity declined, indicating increased ecological pressure. Our findings contribute to understanding middle Miocene paleoecology in northern China and the adaptive strategies of mammals in response to environmental changes.