To improve the accuracy and reliability of EEG motor imagery classification, a WPD-AFBCSP-based EEG motor imagery classification algorithm is proposed. The algorithm first uses the wavelet packet decomposition (WPD) optimised adaptive filter bank co-space pattern algorithm (WPD-AFBCSP) to obtain multidimensional spatial features of the EEG signal, and then the optimal spatial features are obtained by feature selection with the mutual information (MI) feature selection algorithm. Finally, the feature matrix is fed into a deep neural network based on stacked auto-encoders(SAE) for left- and right-handed biclassification to achieve recognition of EEG motor imagery. The method achieves 89.3% classification accuracy on the BCI Competition II Data set III dataset, which can identify EEG motor imagery more effectively and provides a new method for the study of EEG motor imagery.