Dragonflies are sensitive to climate change due to their special habitat in aquatic and terrestrial environments, especially Pantala flavescens, which have extraordinary migratory abilities in response to climate change on spatio-temporal scales. At present, there are major gaps in the documentation of insects and the effects of climatic changes on the habitat and species it supports. In this study, we model the global distribution of a wandering glider dragonfly, P. flavescens, and detected the important environmental factors shaping its range, as well as habitat shifts under historical and future warming scenarios. The results showed a global map of species ranges of P. flavescens currently, including southern North America, most of South America, south-central Africa, most of Europe, South, East and Southeast Asia, and northern Oceania, in total, ca. 6581.667 × 104 km2. BIO5 (the max temperature of warmest month) and BIO13 (the precipitation of wettest month) greatly explained its species ranges. The historic refugia were identified around the Great Lakes in the north-central United States. Future warming will increase the total area of suitable habitat and shift the type of suitable habitat compared to the current distribution. The habitat suitability of P. flavescens decreased with elevation, global warming forced it to expand to higher elevations, and the habitat suitability of P. flavescens around the equator increased with global warming. Overall, our study provides a global dynamic pattern of suitable habitats for P. flavescens from the perspective of climate change, and provides a useful reference for biodiversity research and biological conservation.