The classification performance of a brain-computer interface (BCI) depends largely on the methods of data recording and feature extraction. The electrocorticogram (ECoG)-based BCIs are a BCI modality that has the potential to achieve high classification accuracy. This paper proposes a new algorithm for classifying single-trial ECoG during motor imagery. The optimal channel subsets are first selected by genetic algorithms from multi-channel ECoG recordings, then the power features are extracted by common spatial pattern (CSP), and finally Fisher discriminant analysis (FDA) is used for classification. The algorithm is applied to Data set I of BCI Competition III and the classification accuracy of 90% is achieved on test set by using only seven channels.