This research investigates the impact of virtual laboratories (VLabs) based on artificial intelligence (AI) on developing students’ motivation toward learning mathematics. A semiexperimental approach is used to achieve the research objectives. The research sample, consisting of 80students from the seventh grade, is selected by the purposeful sampling approach. The research sample is randomly distributed into three groups: two experimental groups and one control group. The first group of 26 students is taught using the AI-based VLabs, while the second group of 27 students is taught using a VLab based on 3D visual imaging, and the third group, a control group consisting of 27 students, is taught using the traditional approach. The research instrument, a questionnaire for learning motivation, was designed after ensuring its validity and reliability. The findings of the motivation questionnaire indicate that students in the first experimental group have more motivation to learn mathematics than students in the second experimental group and the control group. The results also show that the students in the second experimental group have more motivation to learn mathematics than the students in the control group. Given the said findings, the research recommends using virtual laboratories based on artificial intelligence and all its applications in the learning process due to their impact on students’ mathematics learning.