Generative artificial intelligence represented by ChatGPT is triggering profound changes in Chinese writing instruction.Based on selfdetermination theory, this study uses questionnaires and open-ended feedback to examine the effect of introducing the generative AI chatbot ChatGPT into teacher-led Chinese L2 writing courses on learners' engagement.The participants were 83 Chinese L2 learners, divided into an intervention group and a control group.Learners in the intervention group participated in writing workshops combined with ChatGPT feedback.Results show: (1) Learners using ChatGPT showed improvements in behavioral, emotional, and cognitive engagement in writing; (2) ChatGPT feedback significantly enhanced learners' behavioral and cognitive engagement, while improvements in emotional engagement were limited; (3) There is a certain association between increased engagement and improved writing performance, indicating that generative AI technology has potential to promote learner participation and improve task completion in writing.The study suggests that effective application of generative AI in Chinese writing instruction should be based on learner individual differences and specific writing task requirements, combined with scientific instructional design to achieve more efficient learner engagement and higher writing quality.