Elucidating the responses and potential functions of soil microbial communities during succession is important for understanding biogeochemical processes and the sustainable development of plant communities after environmental disturbances. However, studies of such dynamics during post-mining ecological restoration in alpine areas remain poorly understood. Microbial diversity, nitrogen, and phosphorus cycle functional gene potential in the Heishan mining area of Northwest China was studied, including primitive succession, secondary succession, and artificial succession disturbed by mining. The results revealed that: (1) The dominant bacteria in both categories (non-remediated and ecologically restored) of mining area rhizosphere soil were Proteobacteria, adopting the r strategy, whereas in naturally occurring soil outside the mining area, the dominant bacteria were actinomycetes and Acidobacteria, adopting the k strategy. Notably, mining perturbation significantly reduced the relative abundance of archaea. (2) After restoration, more bacterial network node connections were observed in mining areas than were originally present, whereas the archaeal network showed the opposite trend. (3) The networks of microbial genes related to nitrogen and phosphorus cycle potential differed significantly, depending on the succession type. Namely, prior to restoration, there were more phosphorus related functional gene network connections; these were also more strongly correlated, and the network was more aggregated. (4) Soil factors such as pH and NO3–N affected both the mining area remediation soil and the soil outside the mining area, but did not affect the soil of the original vegetation in the mining area. The changes in the structure and function of plant rhizosphere microorganisms after mining disturbance can provide a theoretical basis for the natural restoration of mining areas.