BackgroundPseudostellaria heterophylla is used in traditional Chinese medicine, so ensuring an adequate supply of plant material with high levels of bioactive components is important.MethodsUsing an optimized maximum entropy niche model and assays of bioactive components from cultivation samples, this study started from the plant’s natural distribution area and estimated correlations of ecological factors with not only abundance of the plant but also abundance of polysaccharides and heterophyllin B. These correlations were combined with the spatial analysis function in ArcGIS to generate maps of the suitability of different habitats in China for cultivating P. heterophylla under current climate conditions and different models of climate change.ResultsThe following ecological factors emerged as particularly important for habitat suitability: precipitation of driest month and driest quarter, annual precipitation, annual mean temperature, temperature seasonality, and mean temperature of coldest quarter, contributing to a cumulative total of 87%. Under current climate conditions, optimum habitats of P. heterophylla were mainly distributed in the southwestern region (Guizhou) and eastern regions (Anhui, Zhejiang, Fujian, Jiangsu) of China, and only 0.197×106 km2 of these areas were optimum habitat. In future climate change scenarios, the optimal habitat area of P. heterophylla exhibited an increase across different time periods under the SSP5-8.5 climate scenario. By the 2090s, distribution area of high heterophyllin B content under SSP5-8.5 climate scenarios will increase significantly, distribution area of high polysaccharide content had little change under all three climate scenarios (SSP 1-2.6, 2-4.5, 5-8.5). The center of mass of suitable habitat migrates southwestward under scenario SSP 1-2.6 and SSP 2-4.5, while it migrates northward under scenario SSP 5-8.5. Under the three climate scenarios, the center of mass of suitable habitat migrated consistently with that of high polysaccharide content but differed from that of high heterophyllin B content.ConclusionThese findings provide a crucial foundation for cultivating P. heterophylla with superior medicinal properties, developing adaptive management strategies to enhance conservation efforts, and ensuring sustainable utilization in the face of global climate change.