IntroductionThe accumulation of petroleum hydrocarbons (PHs) in the soil can reduce soil porosity, hinder plant growth, and have a serious negative impact on soil ecology. Previously, we developed PH-degrading bacteria and discovered that the interaction between microorganisms may be more important in the degradation of PHs than the ability of exogenous-degrading bacteria. Nevertheless, the role of microbial ecological processes in the remediation process is frequently overlooked.MethodsThis study established six different surfactant-enhanced microbial remediation treatments on PH-contaminated soil using a pot experiment. After 30 days, the PHs removal rate was calculated; the bacterial community assembly process was also determined using the R language program, and the assembly process and the PHs removal rate were correlated.Results and discussionThe rhamnolipid-enhancedBacillus methylotrophicusremediation achieved the highest PHs removal rate, and the bacterial community assembly process was impacted by deterministic factors, whereas the bacterial community assembly process in other treatments with low removal rates was affected by stochastic factors. When compared to the stochastic assembly process and the PHs removal rate, the deterministic assembly process and the PHs removal rate were found to have a significant positive correlation, indicating that the deterministic assembly process of bacterial communities may mediate the efficient removal of PHs. Therefore, this study recommends that when using microorganisms to remediate contaminated soil, care should be taken to avoid strong soil disturbance because directional regulation of bacterial ecological functions can also contribute to efficient removal of pollutants.