The rapid advancement in information and communication technology has made e‐learning an alternative learning method for many learners. In the last few years, a huge number of learners around the world have registered in massive open online courses (MOOCs) provided by various online learning platforms. However, MOOC platforms have a vital task for the online course provider to provide enhanced students' learning experiences and satisfaction. In this work, we developed a brain–computer interface for gathering data and detecting a learner's mental situation by observing MOOC videos and electroencephalogram (EEG) devices based on John Sweller's Cognitive Load Theory. The acquired EEG signals are preprocessed with two different normalization methods to scale signals. To validate the introduced framework, the system adopted three machine learning algorithms (random forest using non‐Markovian model, support vector machine, and k‐nearest neighbors) to develop a model with preprocessed training data and test the classifiers to validate their ensemble classifiers' performance. Finally, experimental analysis showed that the random forest classifier with the non‐Markovian approach achieved more than the other two techniques in the form of overall accuracy (99.15%) and F‐measures (99.21%).