Background: Self-directed learning (SDL) has evolved as an adaptable educational environment, providing flexibility and individualization that meet students' psychological needs and enhance their educational experiences. In turn, these experiences significantly affect student motivation, reinforcing the crucial role of the learning environment in its promotion. To leverage the educational potential of SDL in synergy with traditional teacher directed environments, in-depth research is vital. Aims: Grounded in the Self-Determination Theory and Stage-Environment Fit Theory, this research employs longitudinal data to examine how modifications in learning environments influence students' basic needs and motivation. Sample: The research incorporated 754 German students, with an average age of 13.56 (SD = 1.2, 49.7% female). Method: Over the span of a year, the study scrutinized data from two distinct educational environments: self directed learning (SDL) and teacher-directed instruction (TDI). The Latent Change Score Models were used for the data analysis, considering performance data, age, and gender. Results: The analysis showed an overall increase in students' basic need satisfaction during SDL. Conversely, TDI had no substantial effect on autonomy and social relatedness. An increase in intrinsic and identified motivation was noticed during SDL, while introjected and extrinsic motivation displayed a decreasing trend, particularly during SDL. These observations emphasize the qualitative differences between both environments. Conclusion: The findings suggest an integrated approach of SDL and TDI to mitigate the detected decrease in motivation. They highlight SDL's potential in shaping motivation and meeting basic needs and stress the importance of maintaining an optimal balance between SDL and TDI in different educational settings.