The cross-session and cross-subject classification of motor imagery Electroencephalogram (EEG) signals is challenging. This paper presents a Transfer Learning (TL) method to address the cross-session and cross-subject classification of motor imagery Electroencephalogram (EEG) signals, a tricky procedure in brain-computer interface (BCI). Method: We propose a rotation alignment domain adaptation method with Riemannian mean (RMRA). The method uses covariance matrix to represent data feature, and achieves data alignment by rotating the symmetric positive definite (SPD) matrix in Riemannian space. In this process, our proposed matrix-TCA extends the traditional transfer component analysis (TCA) to a matrix form in order to function in the Riemannian framework. Data labels are not required, so the proposed method is unsupervised. In addition, we simplify the calculation process through Riemannian mean. Results: We have performed both offline and online experiments on multiple motor imagery EEG data sets. Our results show that RMRA improves the cross-session and cross-subject classification accuracy. Conclusion and significance: This paper presents a new approach to cross-domain learning, which achieves desirable results and shows great promise in real-life application of the service robot (intelligent wheelchair).