This study has two objectives. The first objective is to examine the mediating role of intellectual engagement in the relationship between online engagement and affective learning. The second objective is to investigate the mediating role of academic engagement in the relationship between intellectual engagement and affective learning as well as between online engagement and affective learning. The study sample comprises of undergraduate students studying in a large private Indian university. The results of structural analysis using 280 responses collected from the undergraduate students support the hypotheses that academic and intellectual engagement constructs mediate the relationship between online engagement and affective learning. Moreover, it was found that compared to intellectual engagement, the role of online engagement is statistically more central to enhancing academic engagement and in turn affective learning. The findings encourage educators to provide academic settings backed by online resources instead of depending only on online resources.