Collaborative programming helps improve students' computational thinking and increases their confidence in solving programming problems. However, the effect of collaborative learning is not ideal because it is difficult for students to mobilize metacognition to regulate learning spontaneously. To guide students to effectively regulate the learning process when they collaborate to solve programming problems, this study develops a collaborative learning approach and a Collaborative programming System (MR‐CPS) based on metacognitive regulation to support students' collaborative programming learning. A quasi‐experimental study was conducted in a junior high school programming course in Taiwan to assess the effects on students. The impacts of MR‐CPS from both individual and collaborative perspectives were investigated. Students' learning achievement and computational thinking tendencies were examined from an individual perspective. From a collaborative perspective, group self‐efficacy and group metacognition were investigated. Participants were divided into MR‐CPS (n = 115) and No‐MR‐CPS (n = 107). The MR‐CPS group used the collaborative programming approach with metacognitive regulation mechanisms as the experimental group. In contrast, the No‐MR‐CPS group used the collaborative programming approach without metacognitive regulation mechanisms as the control group. The results show that the MR‐CPS group statistically significantly outperformed the No‐MR‐CPS group in learning achievements. It was also found that the MR‐CPS group had statistically significantly better computational thinking tendency, collective efficacy and metacognitive planning and evaluation skills than the No‐MR‐CPS group. This finding suggests that the MR‐CPS has the potential to improve students' learning achievements, computational thinking tendency, group metacognition and collective efficacy. The study results have implications for the design of collaborative programming systems consistent with metacognitive regulation.