Limited activity of the rhizosphere microbiome and reduced soil nutrient cycling, in particular phosphorus (P), in saline soils, leads to a loss in crop productivity. Using plant growth-promoting rhizobacteria (PGPR) as microbiological fertilizer to regulate rhizosphere ecology and increase nutrient uptake is a potential approach to improve plant growth in saline conditions. In present study, a novel Bacillus megaterium strain isolated from saline soil was found to promote crop growth. The results showed that a B. megaterium OQ560352 strain altered the composition of fungal and bacterial communities in the rhizosphere of maize and increased the relative abundance of genes involved in P cycling. Actinobacteria and Bacteroidetes were identified as phyla because they had a negative correlation with soil P concentration and a positive correlation with alkaline phosphatase (ALP) activity. Compared to chemical fertilizer applied alone on saline soil, NPK fertilizer mixed with B. megaterium improved shoot biomass, shoot P concentration, soil P concentration, and ALP activity by 4%, 6%, 10%, and 13%, respectively. Collectively, the present study suggests that the novel isolated B. megaterium is an efficient PGPR for regulating the rhizosphere microbiome in saline soils to promote plant resistance to salinity.