This study investigates the impact of AI-driven gamified feedback on the writing performance, self-efficacy, and engagement of 120 Brazilian undergraduate EFL learners. Utilizing a quasi-experimental pretest-posttest design, the experimental group interacted with an AI configured as a Game Master, transforming feedback into narrative-based quests. Quantitative findings indicate that the experimental group demonstrated significant improvements in writing accuracy and cognitive engagement compared to the control group. The results support Self-Determination Theory, suggesting that gamified AI feedback satisfies psychological needs for competence and autonomy. The study provides a validated framework for educators to integrate adaptive AI tools into academic writing curricula, balancing technological innovation with essential instructor-led mediation to foster student persistence and success.