Molecular imprinting technology holds significant potential for applications in chemical analysis and detection. In order to integrate the fundamental knowledge of polymer chemistry, electrochemistry, and analytical chemistry with practical applications and cutting-edge research, we proposed a comprehensive experiment of the preparation, characterization, and evaluation of electrochemical sensors tailored for senior undergraduate chemistry students as an optional project in the Comprehensive Chemistry Experiment course. Starting with cortisol detection, this experiment sparks students' interest. The experimental design encompasses the preparation and principles of molecularly imprinted polymers, characterization of polymers using infrared spectroscopy, preparation of carbon paste electrodes, electrode testing, and evaluation. This aids students in honing their hands-on skills and integrating the textbook content. A total of 20 students enrolled in the project. After completing the hierarchical and progressive preview questions, group discussion, postreflection questions, and survey provided by the instructor, the results demonstrated that 80% of the students were able to draw the chart correctly, and the relative standard deviation of saliva sample testing results was within 5%. Survey results indicated that this comprehensive experiment was beneficial for cultivating students' research thinking and innovation abilities, suggesting that this experiment could be included as a comprehensive experimental project for senior undergraduate chemistry majors.