This paper examines intrinsic motivation-driven game elements and designs an Intrinsic Motivation Gamification Framework to provide undergraduates with a persisting, scaffolding, and satisfying online learning experience based on different user profiles. Gamification became the main resolution for the low retention rate in learning platforms for undergraduates. Most gamified learning studies focus on the player-type profiling method, while no intrinsic motivation-driven game elements are mapped to certain players. This paper refined self-needs and user motivation in the learning experience from different user behaviours through the distinction method of Grasha Learner Style, deriving six types of learners: independent, dependent, participant, avoidance, collaborative and competitive. Based on the literature review, a gamified framework has been developed to engage the undergraduates to persist in using a self-developed gamified platform, GamiClass up to 16 weeks. Suggested 20 game elements have been deployed based on the needs of the Octalysis Framework and Self Determination Theory. The analysis mirrored the positive impact of game elements (group quest, challenges and time pressure) on the undergraduates. In contrast, choices/consequences and exploration game elements negatively affect the undergraduates' continuity in the gamified platform. Furthermore, the group quest was identified as the critical game element that stimulates various types of undergraduates in competition and collaboration, thus internalising their extrinsic motivation into intrinsic motivation during their learning journey.