PurposeIn order to improve the weak recognition accuracy and robustness of the classification algorithm for brain-computer interface (BCI), this paper proposed a novel classification algorithm for motor imagery based on temporal and spatial characteristics extracted by using convolutional neural networks (TS-CNN) model.Design/methodology/approachAccording to the proposed algorithm, a five-layer neural network model was constructed to classify the electroencephalogram (EEG) signals. Firstly, the author designed a motor imagery-based BCI experiment, and four subjects were recruited to participate in the experiment for the recording of EEG signals. Then, after the EEG signals were preprocessed, the temporal and spatial characteristics of EEG signals were extracted by longitudinal convolutional kernel and transverse convolutional kernels, respectively. Finally, the classification of motor imagery was completed by using two fully connected layers.FindingsTo validate the classification performance and efficiency of the proposed algorithm, the comparative experiments with the state-of-the-arts algorithms are applied to validate the proposed algorithm. Experimental results have shown that the proposed TS-CNN model has the best performance and efficiency in the classification of motor imagery, reflecting on the introduced accuracy, precision, recall, ROC curve and F-score indexes.Originality/valueThe proposed TS-CNN model accurately recognized the EEG signals for different tasks of motor imagery, and provided theoretical basis and technical support for the application of BCI control system in the field of rehabilitation exoskeleton.