The power of common spatial pattern (CSP) has been widely validated in electroencephalogram (EEG) based brain–computer interface (BCI). However, its effectiveness is highly dependent on subject-specific time segment, channel configuration and frequency band. Hence, the preprocessing procedure of CSP algorithm is critical to enhance the performance of BCI system. This paper proposes a feature extraction and selection method based on common spatial and spectral pattern for motor imagery brain–computer interface (BCI). We formulate the optimization of spatial spectral patterns, channel configuration and time segment as maximizing the proposed criterions including mutual information algorithm, Fisher ratio algorithm and wrapper method. The proposed method is evaluated on single trial EEG from dataset IVa of BCI competition III. The results show that best features are selected by a wrapper method and these features in cross-validation yield better performance compared to most of the reported results.