IntroductionThe increasing prevalence of online learning has transformed how students acquire knowledge and develop entrepreneurial capabilities. This study examines how online learning flexibility influences entrepreneurial opportunity recognition through the sequential mediating roles of perceived flexibility of time and entrepreneurial self-efficacy.MethodsDrawing on the Theory of Planned Behaviour and Social Cognitive Theory, a conceptual model was developed and tested using covariance-based structural equation modelling (CB-SEM). Data were collected from 376 university students in Saudi Arabia and analysed to examine both direct and indirect relationships among the study constructs.ResultsThe findings indicate that online learning flexibility does not directly influence entrepreneurial opportunity recognition. Instead, its effect operates indirectly through perceived flexibility of time and entrepreneurial self-efficacy. Perceived flexibility of time was positively associated with entrepreneurial self-efficacy and entrepreneurial opportunity recognition, while entrepreneurial self-efficacy emerged as a strong predictor of opportunity recognition. The results also support a significant sequential mediation effect linking online learning flexibility to opportunity recognition through perceived flexibility of time and entrepreneurial self-efficacy.DiscussionThe study demonstrates that flexible online learning environments foster entrepreneurial opportunity recognition primarily by enhancing learners' perceptions of time flexibility and strengthening their entrepreneurial self-efficacy. These findings extend the application of the Theory of Planned Behavior and Social Cognitive Theory to entrepreneurship education and provide practical implications for the design of autonomy-supportive digital learning systems, particularly in the context of Saudi Arabia's ongoing digital transformation initiatives.