Online learning systems are currently the primary approach to delivering information and facilitating learning for postgraduate students, replacing traditional in-person methods in many contexts. To succeed academically in this environment, students must adapt to these systems, a process heavily influenced by personal attributes such as grit and self-efficacy. These factors play a crucial role in helping students navigate the unique challenges of online learning, including increased workloads and technological demands. This study examines the role of academic self-efficacy in mediating the influence of grit and moderating the influence of academic stress on academic achievement. The study approach is quantitative, employing a simple random sampling technique with data collection through a online questionnaire. The data analysis methods include descriptive statistical analysis, Pearson correlation, and structural equation modeling (SEM). The participants were 382 Master’s students, consisting of 131 men (34.3%) and 251 women (65.7%), with an age range of 22-28 years. Most participants belonged to the Makassar ethnic group (33.0%), with the remaining 67.0% comprising individuals from various other ethnic groups, both within and outside South Sulawesi. The results show an average academic self-efficacy score of 3.36 (SD = 1.08). The findings indicate that academic self-efficacy functions as a perfect mediator in the effect of grit on academic achievement (β= .130; t = 6.366 > 1.96) and as a moderator in the effect of academic stress on academic achievement (β = .027; t = 5.850 > 1.96). Therefore, academic self-efficacy is a major psychological resource that drives academic performance, with the structural model explaining 72.4% of the variability in academic achievement. The study implications support the development of a theoretical model as a basis for implementing programs to improve academic self-efficacy and support students’ academic performance in an online environment.