Brain-computer interface (BCI) is a technology used to convert brain signals to control external devices. Researchers have designed and built many interfaces and applications in the last couple of decades. BCI is used for prevention, detection, diagnosis, rehabilitation, and restoration in healthcare. EEG signals are analyzed in this paper to help paralyzed people in rehabilitation. The electroencephalogram (EEG) signals recorded from five healthy subjects are used in this study. The sensor level EEG signals are converted to source signals using the inverse problem solution. Then, the cortical sources are calculated using sLORETA methods at nine regions marked by a neurophysiologist. The features are extracted from cortical sources by using the common spatial pattern (CSP) method and classified by a support vector machine (SVM). Both the sensor and the computed cortical signals corresponding to motor imagery of the hand and foot are used to train the SVM algorithm. Then, the signals outside the training set are used to test the classification performance of the classifier. The 0.1-30 Hz and mu rhythm band-pass filtered activity is also analyzed for the EEG signals. The classification performance and recognition of the imagery improved up to 100% under some conditions for the cortical level. The cortical source signals at the regions contributing to motor commands are investigated and used to improve the classification of motor imagery.