This study examined the relationship among foreign language enjoyment (FLE), second language L2 grit, online learning self-efficacy (OLSE), and online learning engagement among Iranian English as a foreign language (EFL) learners. The study involved 578 Iranian EFL learners who completed self-report measures of the four constructs. Confirmatory factor analysis and structural equation modeling were employed to confirm the validity of the scales and test the hypothesized model. The findings indicate that FLE positively affects online learning engagement and OLSE positively influences online learning engagement. Additionally, the study found that online self-efficacy mediates the relationship between L2 grit and online learning engagement. These results highlight the importance of FLE and OLSE in promoting online learning engagement, and the mediating role of online self-efficacy in the interplay between L2 grit and online learning engagement. This research sheds more light on the understanding of the factors that influence online learning engagement among EFL learners and has important implications for both theory and practice.