As lack of interaction has been cited as a central reason for reduced academic motivation during online learning and given gratitude's crucial role in forming and maintaining interpersonal relationships, this study examined the association between gratitude and academic motivation. Recent systematic reviews and meta-analyses have found psychological needs satisfaction to be related to autonomous motivation and indicators of well-being. As such, this study also examined the mediating role of psychological needs satisfaction on the relationship between gratitude and academic motivation during online learning among undergraduates in Malaysia. Two hundred and fifty students who are pursuing their tertiary education in private universities across the country filled in an online survey. Results revealed that there is a significant positive relationship between gratitude and autonomous academic motivation and a significant negative relationship between gratitude and academic amotivation. Gratitude, however, is not significantly associated with controlled academic motivation. Further, it was found that psychological needs satisfaction significantly mediates the relationships between gratitude and autonomous academic motivation as well as gratitude and academic amotivation. Psychological needs satisfaction, however, does not significantly mediate the relationship between gratitude and controlled academic motivation. These findings provide insights into addressing the problem of declining academic motivation during online learning.