Acid mine drainage (AMD) poses a serious threat to rice paddy ecosystems, yet its impact on the composition and dynamics of soil nitrogen-fixing microorganisms remains poorly understood. In this study, a pot experiment was conducted using paddy soil collected from a mining area under three pollution treatments, to analyze changes in the structure of the nitrogen-fixing microbial community across different growth stages and treatments. The results showed that AMD irrigation led to soil acidification, sulfate accumulation, and a significant reduction in the diversity of nitrogen-fixing microorganisms in the root zone. Compared to the control, the Shannon index decreased by 11.65–24.79% in contaminated soil. LEfSe analysis indicated that AMD enriched metal-tolerant and sulfate-resistant microbial taxa. Irrigation with clean water was insufficient to fully restore the soil environment. The assembly process of the AMD soil community was governed solely by stochastic processes, indicating structural instability of the community. This study suggests that remediation strategies should prioritize neutralizing acidity and restoring nutrient balance to support the stability and recovery of nitrogen-fixing microorganisms. These findings provide new insight into how AMD disrupts diazotrophic community assembly, with direct implications for paddy soil restoration.