To explore the mechanism by which the plant growth-promoting bacterium Brevibacillus sp. SR-9 improves sweet sorghum tolerance and enriches soil cadmium (Cd) under pot conditions, the effect of strain SR-9 inoculation on the microbial community of sorghum rhizosphere soil was analyzed by metagenomics. Gene expression in sweet sorghum roots was analyzed using transcriptomics. The results showed that strain SR-9 promoted the growth of sweet sorghum and improved the absorption and enrichment of Cd in the plants. Compared with the uninoculated treatment, the aboveground part and root dry weight in strain SR-9 inoculated with sorghum increased by 21.09% and 17.37%, respectively, and the accumulation of Cd increased by 135% and 53.41%, respectively. High-throughput sequencing showed that strain SR-9 inoculation altered the rhizosphere bacterial community, significantly increasing the relative abundance of Actinobacteria and Firmicutes. Metagenomic analysis showed that after inoculation with strain SR-9, the abundance of genes involved in amino acid transport metabolism, energy generation and conversion, and carbohydrate transport metabolism increased. KEGG functional classification showed that inoculation with strain SR-9 increased the abundance of genes involved in soil microbial metabolic pathways in the rhizosphere soil of sweet sorghum and the activity of soil bacteria. Transcriptome analysis identified 198 upregulated differentially expressed genes in sweet sorghum inoculated with strain SR-9, including those involved in genetic information processing, biological system, metabolism, environmental information processing, cellular process, and human disease. Most of the annotated differentially expressed genes were enriched in the metabolic category and were related to pathways such as signal transduction, carbohydrate metabolism, amino acid metabolism, and biosynthesis of other secondary metabolites. This study showed that plant growth-promoting bacteria can alter the rhizosphere bacterial community composition, increasing the activity of soil bacteria and upregulating gene expression in sweet sorghum roots. The findings enhance our understanding of the microbiological and botanical mechanisms by which plant growth-promoting bacterial inoculation improves the remediation of heavy metals by sorghum.