This study aims to examine the influence of prior knowledge and entrepreneurial motivation on entrepreneurial intention among students at the Faculty of Economics and Business, Universitas Muhammadiyah Surakarta, using opportunity recognition as a mediating variable. A quantitative survey approach was employed. A systematic questionnaire was administered to students who had completed entrepreneurial courses to collect primary data. Using SmartPLS, structural equation modelling based on partial least squares (SEM-PLS) was employed to analyse the data. The findings show that opportunity spotting is significantly and positively affected by prior knowledge and entrepreneurial zeal. Furthermore, entrepreneurial drive is positively and significantly impacted by opportunity recognition. The study's primary conclusion is that the link between prior knowledge and entrepreneurial intention is significantly mediated by opportunity recognition. These results imply that when students can recognise and assess prospective business opportunities, their initial knowledge and entrepreneurial drive are more effective at creating entrepreneurial intention. This study offers helpful recommendations for improving entrepreneurship instruction in higher education institutions and conceptually expands the corpus of knowledge on cognitive-based entrepreneurship.