EEG-based emotion recognition is one of the hot research directions in the field of human-computer interaction. The traditional user-dependent models have had remarkable success. However, due to the individual differences, the generalization performance of traditional models is poor for user-independent emotion recognition. Therefore, this work proposes a two-step domain adversarial transfer learning based on typical subjects (TS-DATL) framework with pretraining and domain adversarial training. Pre-training is to find out several typical representative subjects in the training dataset and mark the data most similar to the target domain as the source domain. Domain adversarial training is to narrow the mapping gap between the source domain and the target domain on the common feature space. Experiments were conducted on a public dataset DEAP. The results show that TS-DATL framework successfully reduces the difference of EEG signals across subjects, and effectively improves the prediction accuracy of two emotional dimensions.