Affective computing is very important in modern human–machine interaction. It aims to research and develop systems and devices which can precisely recognize, interpret, synthesize, and/or simulate human affects. Electroencephalogram (EEG) is an important input of affective computing systems. This chapter summarizes recent progresses in EEG-based affective computing. It first introduces the history, theories, and flowchart of EEG-based affective computing, and popular public datasets. Next, it describes commonly used features and machine learning algorithms, focusing on transfer learning, active learning, and deep learning. Finally, challenges and future research directions are pointed out.