This study utilizes VRML and ASP.NET technologies to model foreign language teaching scenarios, including the basic configuration of teaching scenarios, the creation of irregular shapes, and the addition of lighting effects. In addition, to make the foreign language teaching scenarios more realistic, the browser’s change function is used to navigate the virtual classroom. At the same time, based on the interactive modules and virtual character models of the virtual scenario, the personalization and fun of foreign language teaching are enhanced. This scenario was applied to a foreign language teaching simulation at a university in City Y and compared with traditional teaching scenarios to analyze its impact on students’ foreign language learning. The teaching scenario in this study received a relatively low score of 4.01 in terms of controllability, while all other indicators scored above 4.2, indicating good user experience. In this scenario, the foreign language proficiency of experimental class students significantly improved, with a difference of 5.25 points between pre- and post-test scores, and an increase of 0.83 to 1.04 points in scores for three indicators of syntactic ability. Additionally, experimental class students’ satisfaction scores for foreign language learning interest, attitude, motivation, and learning outcomes exceeded 4.3 points in this scenario. Virtual teaching environments can enhance students’ sense of presence during learning, enabling teaching activities to transcend time, space, and teacher constraints, thereby effectively improving teaching outcomes.