Coping with increasing global temperatures due to climate change may be especially challenging for trees with long generation times as changes might happen too quickly for successful adaptation. Juniperus przewalskii Komarov is an arid tolerant key species of forest ecosystems on the northeastern Qinghai–Tibet Plateau. Target capture sequencing was utilized to survey genetic variation and population structure, and to infer the evolutionary history of this species by analyzing 170 individuals from 23 populations. This approach provided valuable information on how local adaptation influences the genetic background of this species, as well as potential predictions regarding the species' response to global climate change. Our results revealed a new fine-scale genetic structure and high levels of genetic diversity as well as local adaptations despite gene flow. Redundancy analysis showed that climate contributed the most to the genetic variation of J. przewalskii. Analysis of gradient forest and risk of nonadaptedness indicated that, for the variables examined and the majority of locations sampled, it is improbable that J. przewalskii will need significant alterations in allele frequencies to endure the forecasted climate shifts. We also identified the most at-risk populations for preservation and numerous candidate genes that may be valuable for upcoming climate change. The significance of combining genetic and environmental information to forecast the resilience of a key tree species to global warming is underscored in our results, particularly in areas susceptible to climate fluctuations.</p