The percentage of Malaysian students in Science, Technology, Engineering, and Mathematics (STEM) is less than 60%, as highlighted by the Ministry of Science, Technology, and Innovation (MOSTI). STEM talent is essential as the catalyst for the development of a country. The vision of the Sustainable Development Goals (SDG) of the United Nations to produce new science and technology that are sustainable, affordable, and safe, could be achieved by encouraging students to take courses in science and technology. One of the universities in Sabah has taken the initiative to conduct a STEM outreach programme at SMK Tongod during the Imbak Canyon Scientific Expedition 2022 to promote STEM. The study was conducted to identify the factors that influence the intention of secondary students to pursue STEM education. The theory underpinning the present study was the Theory of Planned Behaviour (TPB). The dependent variable was students’ intention to study STEM, and the independent variables were attitude towards STEM, normative social influences, and self-efficacy. The data were collected using questionnaires, which were distributed to 50 secondary students. The data were analysed using the SmartPLS. The findings have important implications. Parents, educators, and society can influence students’ attitudes towards STEM education.