The integration of coding and mathematics education, known as coding-integrated mathematics education, has received much attention due to the strength of Artificial Intelligence-based Science, Technology, Engineering, Arts, and Mathematics (AI-based STEAM) education in improving students’ affective domain. The present study investigated the effectiveness of coding-integrated mathematics education on students’ development of affective mathematics engagement. Participants in this study were 86 middle and high school students who attended the coding-integrated mathematics program. Surveys of students’ affective mathematics engagement were administered before and after the intervention period. The results showed that students’ affective mathematics engagement was statistically significantly improved through coding-integrated mathematics education. In particular, students exhibited increased positive affective mathematics engagement in terms of mathematical attitude, emotion, and value. These findings indicate the positive influence of coding-integrated mathematics education on students’ learning in mathematics.