This research gap provides the basis for conducting the present study to obtain empirical evidence regarding the effectiveness of ChatGPT in enhancing students’ mathematics learning motivation. This study aimed to analyze the improvement of mathematics learning motivation among ninth-grade students of MTs. Qur’aniyah after using ChatGPT as a learning companion. The study employed a quantitative approach with a One-Group Pretest–Posttest design. The sample consisted of 30 students selected through purposive sampling. Data were collected using a Likert-scale learning motivation questionnaire that had been tested for validity using the Pearson Product-Moment correlation and for reliability using Cronbach’s Alpha. Data analysis was conducted through descriptive statistics, the Kolmogorov–Smirnov normality test, the Paired Sample t-Test, and Effect Size (Cohen’s d) calculation. The findings revealed an increase in students’ mathematics learning motivation after the implementation of ChatGPT. The mean motivation score increased from 39.47 in the pre-test to 46.83 in the post-test. The Paired Sample t-Test yielded a significance value of 0.001 (p < 0.05), indicating that the improvement was statistically significant. Furthermore, the Effect Size analysis produced a Cohen’s d value of 0.66, which falls into the medium-to-large effect category. These findings suggest that the use of ChatGPT has a meaningful impact on improving students’ mathematics learning motivation by providing responsive, personalized, and easily accessible learning assistance. Therefore, ChatGPT has the potential to serve as an effective learning support tool for enhancing mathematics learning motivation in Islamic junior secondary schools.