Context A challenge for medical educators is to better understand the personal factors that lead to individual success in medical school and beyond. Recently, educational researchers in fields outside medicine have acknowledged the importance of motivation and emotion in students' learning and performance. These affective factors have received less emphasis in the medical education literature.Objectives This longitudinal study examined the relations between medical students' motivational beliefs (task value and self-efficacy), achievement emotions (enjoyment, anxiety and boredom) and academic achievement.Methods Second-year medical students (n = 136) completed motivational beliefs and achievement emotions surveys following their first and second trimesters, respectively. Academic achievement was operationalised as students' average course examination grades and national board shelf examination scores.Results The results largely confirmed the hypothesised relations between beliefs, emotions and achievement. Structural equation modelling revealed that task value beliefs were positively associated with course-related enjoyment (standardised regression coefficient [β] = 0.59) and were negatively related to boredom (β = - 0.25), whereas self-efficacy beliefs were negatively associated with course-related anxiety only (β = - 0.47). Furthermore, student enjoyment was positively associated with national board shelf examination score (β = 0.31), whereas anxiety and boredom were both negatively related to course examination grade (β = - 0.36 and - 0.27, respectively). The overall structural model accounted for considerable variance in each of the achievement outcomes: R2 = 0.20 and 0.14 for the course examination grade and national board shelf examination score, respectively.Conclusions This study suggests that medical students' motivational beliefs and achievement emotions are important contributors to their academic achievement. These results have implications for medical educators striving to understand the personal factors that influence learning and performance in medical training.