The purpose of this study was to develop a structural model of students' academic engagement based on the achievement and self-regulation goals with the mediating role of academic motivation. In a descriptive-correlational study, 473 female students from the second-cycle secondary schools in the city of Ilām were selected, using a random stratified sampling method. They responded to a self-report questionnaire including the Zerang academic engagement questionnaire, Elliot and McGregor (2001) achievement goals Inventory, Valerand, Peltier, Blys et al (1992) Educational Motivation Scale and Self-Regulatory Questionnaire (MSLQ). The results of the structural equation analysis showed that mastery-approach and performance-approach achievement goals have a significant indirect effect on academic engagement by mediating internal and external motivation. The self-regulation variable also had a significant indirect effect on the academic engagement by mediating internal and external motivation. Also, self-regulation had a direct positive and significant effect on the academic motivation; the achievement goals of mastery-approach and performance-approach had a direct effect on internal and external motivation, and the internal and external motivation had a direct effect on the academic engagement. According to the results of this study, identification of variables associated with the academic engagement can help educators to organize the educational programs and environments that leads to the selection of the desired achievement goals, the development of the students' self-regulation skills and motivation and, consequently, increasing their academic engagement and improving the educational outcomes.