In order to improve and explore the issue of engagement in children's moral education classes, this study designed, developed, and used a VR educational game called “Dream Back to Dunhuang,” and tested its effectiveness in student engagement. This study used a quasi-experimental method to collect data from observations, questionnaires, and interviews. The participants were divided into a game teaching group (group one) and a traditional teaching group (group two) for a period of five weeks. Student engagement was measured and compared from behavioral, emotional, and cognitive engagement. The results showed that the overall engagement level of group one was higher than that of group two. This game effectively improved students' story comprehension, language expression skills, and vivid performance. Moreover, some children in group two also applied the knowledge they have learned to their daily lives. However, the game was not significant enough in improving physical expression ability. Finally, the researchers proposed suggestions for applying educational games to children's moral education.