[Objective] The application of support vector regression machines in soil moisture prediction based on bacteria foraging optimization algorithm(BFOA) was discussed to provide supports for the prediction of soil moisture of modern agriculture and agricultural production.[Methods] The soil moisture prediction model based on support vector regression machines(SVR) was established.And the related parameters of SVR were optimized by using bacteria foraging optimization algorithm(BFOA).Then the model was set up and tested according to the collected data of growing region.[Results] The proposed algorithm was compared with the established model using SVR and SVR based on particle swarm optimization, respectively. The results showed that the prediction model established by the proposed algorithm performed better.[Conclusion] The model had been applied to the actual project. The prediction accuracy of the model was testified well and the operation was stable. The validity and feasibility of the proposed algorithm had been proved.