Under the background of global climate change, the variation in the spatial distribution and ice volume of mountain glaciers have a profound influence on regional economic development and ecological security. The development of glaciers is like biological succession; when climate change approaches or exceeds the threshold of suitable conditions for glacier development, it will lead to changes in potential distribution pattern. Therefore, from the perspective of the "biological" characteristics of glaciers, it is a beneficial exploration and attempt in the field of glaciology to explore its potential distribution law with the help of the niche model. The maximum entropy model (MaxEnt) can explain the environmental conditions suitable for the survival of things by analyzing the mathematical characteristics and distribution laws of samples in space. According to glacier samples and the geographical environment data screened by correlation analysis and iterative calculation, the potential distribution pattern of Tianshan glaciers in China in reference years (1970–2000) was simulated by MaxEnt. This paper describes the contribution of geographical environmental factors to distribution of glaciers in Tianshan Mountains, quantifies the threshold range of factors affecting the suitable habitat of glaciers, and predicts the area variation and distribution pattern of glaciers under different climate scenarios (SSP1-2.6, SSP5-8.5) in the future (2040–2060, 2080–2100). The results show that the MaxEnt model has good adaptability to simulate the distribution of glaciers. The spatial heterogeneity of potential distribution of glaciers is caused by the spatio-temporal differences of hydrothermal combination and topographic conditions. Among the environmental variables, precipitation during the wettest month, altitude, annual mean temperature, and temperature seasonality have more significant effects on the potential distribution of glaciers. There is significant spatial heterogeneity in the potential distribution of glaciers in different watersheds, altitudes, and aspects. From the forecast results of glacier in various climatic scenarios in the future, about 18.16–27.62% of the total reference year glacier area are in an alternating change of melting and accumulation, among which few glaciers are increasing, but this has not changed the overall retreat trend of glaciers in the study area. Under the low emission scenario, the glacier area of the Tianshan Mountains in China decreased by 18.18% and 23.73% respectively in the middle and end of the 21st century compared with the reference years and decreased by 20.04% and 27.63%, respectively, under the high emission scenario, which showed that the extent of glacier retreat is more intense under the high emission scenario. Our study offers momentous theoretical value and practical significance for enriching and expanding the theories and analytical methods of the glacier change.