With the development of the times, there is an increasing emphasis on Ideological and Political Education (IPE) for students. Good IPE can improve the quality of students, and enable them to become better citizens in the society. This paper studied the construction of IPE in universities based on intelligent digital education, which aimed to study whether intelligent digital education could improve the quality of IPE. This experiment selected a school that used intelligent digital education and a school that used traditional education. By comparing the results of the five classes of Mao Zedong Thought and the theoretical system of socialism with Chinese characteristics, the principles of Marxist philosophy, the situation and policy, ideological and moral cultivation and legal basis in the two schools, the role of intelligent digital education was highlighted. The scores of Mao Zedong Thought and the theoretical system of socialism with Chinese characteristics in the five classes using intelligent digital education were 86, 90, 92, 87, and 85 respectively. The scores of the five classes using intelligent digital education on the principles of Marxist philosophy were 79, 75, 73, 71, and 78 respectively. The situation and policy scores of the five classes using intelligent digital education were 70, 74, 79, 82, and 77. The scores of ideological and moral cultivation and legal basis of the five classes using intelligent digital education were 85, 90, 93, 88, and 92 respectively. Compared with the traditional IPE, these data had a good improvement in the test scores of students, which proved that intelligent digital education was really helpful for IPE in universities.