Polylepis racemosa is a tree species endemic to the Andes and classified as Critically Endangered. It grows at elevations between 2,900 and 4,300 meters above sea level. It is notable for its high ecological, forestry, and medicinal value, as well as its importance in providing ecosystem services in the Andes. Its current distribution is very restricted, and its populations face increasing habitat degradation associated with both human activities and the effects of climate change. The objective of this study was to identify the key environmental variables that determine habitat suitability for P. racemosa and to model its potential geographic distribution under current climatic conditions and future scenarios for 2050 and 2070, using the MaxEnt algorithm. We used 570 georeferenced records and 20 environmental variables. The results show that the environmental variable that contributes most to the modeling is elevation (71.40 %). The current distribution of P. racemosa is concentrated in Peru, Ecuador, and Bolivia. Peru has the largest area of highly suitable habitat (34,609.25 km²), followed by Ecuador (2,403.10 km²) and Bolivia (69.34 km²). Significant changes are projected under future scenarios. In Bolivia, a notable increase in the area of high suitability is estimated, reaching up to 2439.10% compared to the current area, in the 2070 RCP 4.5 scenario. In Peru, the increase would be 19.05% in the 2070 RCP 8.5 scenario. In contrast, Ecuador shows a decrease of 99.93% by 2070 under RCP 8.5. These results show that climate change will alter the distribution of P. racemosa. These analyses enable conservation strategies to be targeted, critical areas to be prioritized, and restoration actions to be designed to ensure the long-term persistence of the species.