This study explored the effects of interacting with ChatGPT 4.0 on L2 learners’ motivation to write English argumentative essays. Conducted at a public university in a non-English-speaking country, the study had an experimental and mixed-methods design. It utilized both quantitative and qualitative data analyses to inform the development of effective AI-enhanced tailored interventions for teaching L2 essay writing. Overall, the results revealed that interacting with ChatGPT 4.0 had a positive lasting effect on learners’ motivation to write argumentative essays in English. However, a decline in their motivation at the delayed post-intervention stage suggested the need to maintain a balance between utilizing ChatGPT as a writing support tool and enhancing their independent writing capabilities. Learners attributed the increase in their motivation to several factors, including their perceived improvement in essay writing skills, the supportive learning environment created by ChatGPT as a tutor, positive interactions with it, and the development of meta-cognitive awareness by addressing their specific writing issues. The study highlights the potential of AI-based tools in enhancing L2 learners’ motivation in English classrooms.