Nodule-associated nitrogen-fixing microorganisms (diazotrophs) residing in legume root nodules, and they have the potential to enhance legume survival. However, the succession characteristics and mechanisms of leguminous diazotrophic communities remain largely unexplored. We performed a high-throughput nifH amplicon sequencing with samples of root nodules and soil in the three developmental phases (young nodules, active nodules and senescent nodules) of the Sophora davidii (Franch.) Skeels root nodules, aiming to investigate the dynamics of nodule-endophytic diazotrophs during three developmental phases of root nodules. The results demonstrated the presence of diverse diazotrophic bacteria and successional community shifting dominated by Mesorhizobium and Bradyrhizobium inside the nodule according to the nodule development. The relative abundance decreased for Mesorhizobium, while decreased first and then increased for Bradyrhizobium in nodule development from young to active to senescent. Additionally, strains M. amorphae BT-30 and B. diazoefficiens B-26 were isolated and selected to test the interaction between them in co-cultured conditions. Under co-culture conditions: B. diazoefficiens B-26 significantly inhibited the growth of M. amorphae BT-30. Intriguingly, growth of B. diazoefficiens B-26 was significantly promoted by co'culture with M. amorphae BT-30 and could utilize some carbon and nitrogen sources that M. amorphae BT-30 could not. Additionally, the composition of microbial community varied in root nodules, in rhizosphere and in bulk soil. Collectively, our study highlights that developmental phases of nodules and the host microhabitat were the key driving factors for the succession of nodule-associated diazotrophic community.