Endophytic nitrogen-fixing bacteria are versatile and widely distributed in plants. Numerous strains of endophytic nitrogen-fixing bacteria are used as biofertilizers to minimize the utilization of chemical fertilizers, improve nutrient use efficiency, increase crop productivity, and reduce environmental pollution. However, the mechanism underlying the interaction between nitrogen-fixing bacteria and plants is still unclear. So, the present study was planned to assess the effects of endophytic nitrogen-fixing bacteria on sugarcane by analyzing the changes in physiological and biochemical activities. In the current study, Klebsiella variicola DX120E, an endophytic nitrogen-fixing bacterium, was inoculated on sugarcane varieties B8 and ROC22 to evaluate the effects on nitrogen and carbon metabolism-related enzymatic activity and biomass. Results showed that DX120E inoculation improved the enzymatic activities related to gluconeogenesis and nitrogen metabolism increased the sugarcane plant’s height, cane juice Brix, biomass, chlorophyll, and soluble sugar content in sugarcane. Metabolomics analysis revealed that the metabolome modules were highly enriched in carbon and nitrogen metabolic pathways of strain-affected sugarcane than uninoculated control. The identified carbohydrates were associated with the glycolysis or gluconeogenesis and tricarboxylic acid (TCA) cycle in plants. Metabolomic profiling in the present investigation showed that carbohydrate metabolism is coordinated with nitrogen metabolism to provide carbon skeletons and energy to amino acid synthesis, and amino acid degradation results in several metabolites used by the citric acid cycle as an energy source. Moreover, differentially expressed metabolites of non-proteinogenic amino acids have a further complementary role to the action of endophytic nitrogen-fixing bacteria. Meanwhile, a significant difference in metabolites and metabolic pathways present in stems and leaves of B8 and ROC22 varieties was found. This study discovered the potential benefits of DX120E in sugarcane and suggested candidate regulatory elements to enhance interactions between nitrogen-fixing microbes and sugarcane.