BackgroundIn recent years, global climate change in tandem with increased human activity has resulted in habitat degradation or the migration of rare medicinal plants, potentially impacting the quality of medicinal herbs. Astragalus membranaceus var. mongholicus is a valuable bulk medicinal material in Northwest China. As the demand for this medicinal herb continues to increase in both domestic and international markets, ensuring the sustainable development of high-quality Astragali Radix is important. In this study, the maximum entropy (Maxent) model was applied, thereby incorporating 136 distribution records, along with 39 environmental factors of A. membranaceus var. mongholicus, to assess the quality zonation and potential distribution of this species in China under climate change.ResultsThe results showed that the elevation, annual mean temperature, precipitation of wettest month, solar radiation in June, and mean temperature of warmest quarter were the critical environmental factors influencing the accumulation of astragaloside IV and Astragalus polysaccharide in A. membranaceus var. mongholicus. Among the twelve main environmental variables, annual mean temperature, elevation, precipitation of the wettest month, and solar radiation in November were the four most important factors influencing the distribution of A. membranaceus var. mongholicus. In addition, ecological niche modelling revealed that highly suitable habitats were mainly located in central and western Gansu, eastern Qinghai, northern Shaanxi, southern Ningxia, central Inner Mongolia, central Shanxi, and northern Hebei. However, the future projections under climate change suggested a contraction of these suitable areas, shifting towards northeastern high-latitude and high-elevation mountains.ConclusionsThe findings provide essential insights for developing adaptive strategies for A. membranaceus var. mongholicus cultivation in response to climate change and can inform future research on this species. By considering the identified environmental factors and the potential impacts of the predicted climate changes, we can visualize the regional distribution of high-quality Radix Astragali and develop conservation strategies to protect and restore its suitable habitats.