Ecosystem stability arises from the interplay of species diversity, environmental conditions, and external disturbances. Understanding the structure of plant communities, interspecific relationships, and community stability in urban ecosystems is fundamental to ecological restoration and community development. This study utilized the karst city of Guiyang as a case study and employed the α diversity index, variance ratio method (VR), χ2‐test, Pearson correlation test, Spearman rank correlation test, M. Godron stability, and canonical correspondence analysis (CCA). The research focused on analyzing the species diversity, interspecific associations, community stability, and environmental factors of lithophytic moss at various elevations (989–1398 m). The findings revealed the presence of 58 species belonging to 27 genera and 13 families of lithophytic moss in the study area. Notably, the Brachytheciaceae and Pottiaceae emerged as dominant, exhibiting a broad ecological range and adaptation mechanisms, thereby playing a crucial role in the ecological environment of rocky desertification. The study observed that the highest species richness and dominance values of lithophytic moss were recorded at the N4 (1296–1398 m) elevation gradient, while the highest species diversity and uniformity values were observed at the N3 (1194–1295 m) elevation gradient, indicating a significant impact of altitude on lithobryophyte species diversity, particularly at middle and high altitudes. The analysis of interspecific associations and stability indicated a predominantly negative overall association within the lithophytic moss community, suggesting an early stage of succession, with weak interspecific associations and correlations among dominant pairs, tending towards relative independence. Only the communities at N2 (1092–1193 m) elevation exhibited stability, while the other communities were in an unstable stage, showing no significant correlation with species diversity. Furthermore, light intensity (182–129300 lux) exerted the greatest influence on community stability. Additionally, air humidity (36.5–52.3%) and altitude (998–1327 m) emerged as the primary environmental factors influencing community distribution, with a close and positive correlation between the two. These results hold significant reference value for promoting the succession and steady development of vegetation in rocky desertification areas and enhancing the conservation and restoration of vegetation community diversity in karst urban ecosystems.