This paper aims to study the brain-computer interface (BCI) training system for motor imagery (MI) based on virtual reality. In this paper, the MI-BCI software was designed and implemented by using C# and MATLAB mixed programming method, besides, three types of EEG signal pre-processing algorithms, five feature extraction algorithms, and two classification recognition algorithms were integrated to provide off-line analysis, on-line analysis, and adaptive algorithm selection. The results show that by automatically selecting the optimal combination of algorithms for the subjects, the integration degree between the BCI system and the subjects, and the universality of the BCI system are improved. The test objects can all complete the roaming test by constantly adjusting their state of mind under the feedback of virtual reality. The designed training system in this paper can improve the MI ability of subjects.