Rhizobia induce root nodules and fix atmospheric N2 for most legume species in exchange for carbon. However, the diverse endophytic non-rhizobial bacteria in legume nodules that co-exist with rhizobia are often ignored because they are difficult to cultivate using routine cultivation approaches. To enhance our understanding of the incidence and diversity of legume-bacteria associations, a high-throughput sequencing analysis of bacterial 16S rRNA genes was used to examine the bacterial community in the rhizospheres and root nodules of Dalbergia odorifera seedlings that were uninoculated or inoculated with Bradyrhizobium elkanii H255, Rhizobium multihospitium-like HT221, or Burkholderia pyrrocinia-like H022238, in two growth media (nitrogen [N]-supplied soil or N-omitted potting mix). Seedlings inoculated with Bradyrhizobium had significantly more nodules than seedlings in the other inoculation conditions, regardless of growth media. Using the 15N natural abundance method, it was shown that the inoculated plants had significantly higher N2 fixation efficiency (48-57%) and specific nodule activity [269-313 μg N mg-1 of dry weight (dwt) nodule] compared to the uninoculated plants (203 μg N mg-1 dwt nodule). The 16S rRNA gene analysis showed that there was generally a higher bacterial diversity in the rhizosphere than in the nodules in the corresponding condition. Both rhizobial inoculation and media status significantly altered the bacterial communities in the rhizospheres and nodules (P < 0.05), with the exception of the inoculated soil rhizospheres. Regarding non-rhizobial bacteria, three genera, i.e., Lactococcus, Bacillus, and Pseudomonas, were consistently enriched in the rhizosphere and Bradyrhizobium, Chloroplast norank (which belongs to Cyanobacteria), and Lactococcus were commonly found in the nodules. In contrast, common rhizobial genera (including Rhizobium, Mesorhizobium, and Burkholderia) were only present in the nodules at low relative abundances (0.01-3.41%). Regarding non-rhizobial bacteria, 32 genera were found in the nodules, with non-rhizobial bacteria being predominant in the N omitted potting mix (with a relative abundance of 56-87%). This study suggests that legume nodules are inhabited by a high diversity of non-rhizobial bacteria, which may play a vital role in nodulation and N2 fixation in the host plants.