Enhancement of the nitrogen-fixing ability of endophytic bacteria in rice is expected to result in improved nitrogen use under low-nitrogen conditions. Endophytic nitrogen-fixing bacteria require a large amount of energy to fix atmospheric nitrogen. However, it is unknown which carbon source and bacteria would affect nitrogen-fixing activity in rice. Therefore, this study examined genotypic variations in the nitrogen-fixing ability of rice plant stem as affected by non-structural carbohydrates and endophytic bacterial flora in field-grown rice. In the field experiments, six varieties and 10 genotypes of rice were grown in 2017 and 2018 to compare the acetylene reduction activity (nitrogen-fixing activity) and non-structural carbohydrates (glucose, sucrose, and starch) concentration in their stems at the heading stage. For the bacterial flora analysis, two genes were amplified using a primer set of 16S rRNA and nitrogenase (NifH) gene-specific primers. Next, acetylene reduction activity was correlated with sugar concentration among genotypes in both years, suggesting that the levels of soluble sugars influenced stem nitrogen-fixing activity. Bacterial flora analysis also suggested the presence of common and genotype-specific bacterial flora in both 16S rRNA and nifH genes. Similarly, bacteria classified as rhizobia, such as Bradyrhizobium sp. (Alphaproteobacteria) and Paraburkholderia sp. (Betaproteobacteria), were highly abundant in all rice genotypes, suggesting that these bacteria make major contributions to the nitrogen fixation process in rice stems. Gammaproteobacteria were more abundant in CG14 as well, which showed the highest acetylene reduction activity and sugar concentration among genotypes and is also proposed to contribute to the higher amount of nitrogen-fixing activity.