Learning processes are undoubtedly linked to affective factors. Motivation, interest, curiosity and emotions have been already detected as the core of learning processes: affective domain modulates learning. In this work, a quantitative longitudinal study (three courses) has been conducted during primary school teacher training. An initial diagnosis of affective variables (emotions and self-efficacy) and scientifical knowledge revealed that prospective teachers claim feeling negative emotions toward physics and chemistry contents whereas these students report low scientific knowledge. Therefore, a metacognitive and emotional program was implemented in order to modify these emotions and to improve learning. After three courses, emotions, self-efficacy and scientific knowledge were assessed again. The results obtained suggest that the implementation of active methodologies for teaching science could promote positive emotions, it could lead prospective teachers to improve their self-efficacy’ perception and promotes their learning. The relationships between the different variables considered in the research were studied, and a significant relationship was found between the affective variables (self-efficacy and emotions) and cognitive variables. Prospective teachers involved in this research reported more positive emotions, an increase in their self-efficacy perception and an improvement in their scientific knowledge. These findings may lead to a deeper understanding of the affective role in science learning and could be extended to other content that also elicits negative emotions.