The present study was conducted to compare the effect of two barnyard millet varieties viz. Echinochloa frumentacea (L.) (HNJZ) and Echinochloa crusgalli (L.) var. austro-japonensis (BZ), on fertility and physicochemical properties of alkaline soil of Ningxia, China. Soil rhizosphere of BZ and HNJZ with three replicates (5 plants from each replicate) were collected for bacterial communities metagenomic profiling and six rhizosphere soil samples from each treatment for untargeted-metabolomic analysis. Results revealed significant (p < 0.05) improvement in soil fertility for both millet varieties at 0–20 cm depth than 20–40 cm by decreasing the alkalinity and pH, while increasing the organic matter. Proteobacteria, Firmicutes, and Actinobacteria were the most abundant phyla, whereas Megamonas, uncharacterized_Acidobacteria, and Halomonas were the most abundant genera. No difference in bacterial alpha diversity parameters was observed between HNJZ and BZ rhizospheres. Relative abundance of Cellvibrio and Devosia was increased (p < 0.05) in HNJZ, while Arenimonas, Gillisia, Sphingomonas, uncharacterized_Gammaproteobacteria, and Lysobacter were increased significantly (p < 0.05) in BZ rhizospheres. Beta diversity analysis revealed more diverse bacterial communities structure in HNJZ rhizosphere with higher Firmicutes ratio. Non-targeted metabolomic analysis revealed biosynthesis of alkaloids, histamine H2/H3 receptor agonists/antagonists, and arginine/proline metabolism as top three enriched KEGG pathways. The present study indicated that both millet varieties contributed to the reclamation of saline-alkali soil through reducing pH, total salts, and alkalinity while increasing the organic matter.