Adaptive metacognitive scaffolding is developed to provide learning assistance on an as-needed basis; thus, advances the effectiveness of computer-based learning systems. Metacognitive scaffoldings have been developed for some science subjects; however, not for algorithm-learning. The learning algorithm is different from learning science as it is more oriented to problem-solving; therefore, this study is aimed to describe the modelling, development, and evaluation of the adaptive metacognitive scaffolding which is dedicated for encouraging algorithm-learning. In addition, the authors present a new approach for learner modelling to find students' metacognitive state. Adaptivity of the scaffolding is based on the learner modelling. To evaluate the effectiveness of the developed system, it is deployed in a real algorithm-learning classroom of 38 students. The class is randomly divided into two groups: experiment and control. Two parameters are measured from both groups, i.e. academic success and academic satisfaction. Non-parametric statistical test, i.e. Mann-Whitney U-test (significance level 0.01) rejects the null hypothesis (U-value = 86.5 and U-critical = 101). This result verifies that the academic success of the experiment group is significantly higher than that of the control group. In addition, an academic satisfaction survey shows that adaptive scaffolding is valid in assisting students while learning with the system.