Despite the multiple benefits associated with practicing physical activity regularly, less than 20% of the population do it on a daily basis. Physical education classes could contribute, during childhood and adolescence, to consolidating adherence to healthy lifestyle habits. The present study involved 606 secondary school students between the ages of 13 and 19. We analysed the relationships between the perception of psychological control and support for autonomy, the satisfaction and frustration of psychological needs, mind-wandering and mindfulness, positive and negative emotions, motivation towards physical education classes, physical activity and the intention to be physically active—all through a structural equation model, which presented acceptable goodness-of-fit indices. The results showed that students who feel more autonomous see that their psychological needs are met and feel emotionally positive; this will result in the development of autonomous motivation towards physical education classes and physical activity that, in turn, could lead to a greater intention to be physically active