Understanding the spatial distribution of herbaceous vegetation is critical for assessing how biodiversity may respond to climate change, particularly in high-elevation ecosystems. The Qinghai-Tibet Plateau in China is a hotspot of biodiversity research in the world, and the relationship between plant species distribution in alpine communities and topography and soils is understudied in the Anyemaqen Mountains in the northeast of the Qinghai-Tibet Plateau. This study investigates the patterns of α and β diversity of herbaceous plants and their key environmental drivers in the subalpine ecosystem of the Anyemaqen Mountains on the Qinghai-Tibet Plateau. Data on vegetation and environmental variables were collected across a gradient of 10 elevations ranging from 3600 to 4600 m during the 2021 growing season. Statistical analyses, including one-way ANOVA, redundancy analysis (RDA), and Monte Carlo significance tests, revealed significant differences between sunny and shady slopes in species composition and diversity. Species richness decreased with increasing elevation on sunny slopes, while the reverse trend was observed on shady slopes. Elevation and gradient were the most influential factors in both slope aspects, while soil thickness was significant on shady slopes. These findings contribute to understanding the environmental mechanisms that regulate biodiversity in alpine ecosystems and provide valuable insights for formulating conservation strategies in response to climate change.