Brain computer interface (BCI) is known as a good way to communicate between brain and computer or other device. There are many kinds of physiological signal can operate BCI systems. Motor imagery (MI) has been demonstrated to be a good way to operate a BCI system. In some recent studies about MI based BCI systems, low accuracy rate and time consuming are common problems. In this thesis, a novel motor imagery algorithm is proposed to improve the accuracy rate and computational efficiency at the same time. The architecture of many BCI system is quite complex and they involve time consuming processing. The electroencephalography (EEG) signal is the most commonly used inputs for BCI applications but EEG is often contaminated with noise. To overcome such drawbacks, in this paper we use the common spatial pattern (CSP) for feature extraction from EEG and the linear discriminant analysis (LDA) for motor imagery classification. In this study, CSP and LDA have been used to reduce the artifact and classify MI-based EEG signal. We have used two-level cross validation scheme to determine the subject specific best time window and number of CSP features. We have compared the performance of our system with BCI competition results. This novel algorithm with high accuracy rate and efficiency can be applied to real time BCI system in real-life applications.