The Gobi Desert ecosystem is currently experiencing the impacts of persistent climate warming and extreme weather. However, the relative influences of factors such as soil, climate, and spatial variables on the β-diversity of desert plants and their key components have not been systematically studied. In this research, the Dunhuang North Mountain and Mazong Mountain areas were selected as study areas, with a total of 79 plant community plots systematically established. The aim was to explore intercommunity β-diversity and its components and to analyze the interrelationships with climate factors, soil factors, and geographic distance. The results indicate that (1) there is a geographic decay pattern and significant differences among plant communities in the Dunhuang North Mountain and Mazong Mountain areas, with β-diversity primarily driven by replacement components. (2) Climate, soil, and geographic distance significantly influence β-diversity and its replacement components, with climate factors exerting the greatest influence and geographic distance the least. (3) Multiple regression analysis (MRM) reveals differential effects of climate factors, soil factors, and geographic distance on β-diversity and its replacement components, with climate and soil factors exerting a much greater influence than geographic distance. In summary, the β-diversity of plant communities and their replacement components in the Dunhuang North Mountain and Mazong Mountain areas result from the combined effects of habitat filtering and dispersal limitation, with habitat filtering having a greater impact, while environmental heterogeneity is an important factor influencing species differences in this region.