Robotics education has received widespread attention in K-12 education. Studies have pointed out that in robotics courses, learners face challenges in learning abstract content, such as constructing a robot with a good structure and writing programs to drive a robot to complete specific learning tasks. The present study proposed the embodied learning-based computer programming approach and applied it to the LEGO Mindstorms EV3 robotics course. To evaluate its effectiveness, a quasi-experiment was conducted in one public primary school to explore its effects on students’ learning achievement, learning motivation, learning attitudes, learning engagement, and cognitive load. The experimental group (40 students) adopted the embodied learning-based computer programming approach, while the control group (40 students) adopted the conventional computer programming approach. The results showed that the experimental group had significantly better learning achievement in robotics than the control group, and that there was no significant difference in the cognitive load of the two groups. In terms of learning motivation, although both groups showed improvement, the experimental group had higher intrinsic learning motivation. In addition, the experimental group outperformed the control group with regard to learning attitudes and learning engagement (including cognitive, behavioral, and emotional engagement). Accordingly, this study could contribute to future research for developing more effective robotics teaching approaches and computer programming activity design.