Quarantines imposed due to COVID-19 have forced the rapid implementation of e-learning, but also increased the rates of anxiety, depression, and fatigue, which relate to dramatically diminished e-learning motivation. Thus, it was deemed significant to identify e-learning motivating factors related to mental health. Furthermore, because computer programming skills are among the core competencies that professionals are expected to possess in the era of rapid technology development, it was also considered important to identify the factors relating to computer programming learning. Thus, this study applied the Learning Motivating Factors Questionnaire, the Patient Health Questionnaire-9 (PHQ-9), the Generalized Anxiety Disorder Scale-7 (GAD-7), and the Multidimensional Fatigue Inventory-20 (MFI-20) instruments. The sample consisted of 444 e-learners, including 189 computer programming e-learners. The results revealed that higher scores of individual attitude and expectation, challenging goals, clear direction, social pressure, and competition significantly varied across depression categories. The scores of challenging goals, and social pressure and competition, significantly varied across anxiety categories. The scores of individual attitude and expectation, challenging goals, and social pressure and competition significantly varied across general fatigue categories. In the group of computer programming e-learners: challenging goals predicted decreased anxiety; clear direction and challenging goals predicted decreased depression; individual attitude and expectation predicted diminished general fatigue; and challenging goals and punishment predicted diminished mental fatigue. Challenging goals statistically significantly predicted lower mental fatigue, and mental fatigue statistically significantly predicted depression and anxiety in both sample groups.