Personalized courses recommendation technology is one of the hotspots in online education field. A good recommendation algorithm can stimulate learners’ enthusiasm and give full play to different learners’ learning personality. At present, the popular collaborative filtering algorithm ignores the semantic relationship between recommendation items, resulting in unsatisfactory recommendation results. In this paper, an algorithm combining knowledge graph and collaborative filtering is proposed. Firstly, the knowledge graph representation learning method is used to embed the semantic information of the items into a low-dimensional semantic space; then, the semantic similarity between the recommended items is calculated, and then, this item semantic information is fused into the collaborative filtering recommendation algorithm. This algorithm increases the performance of recommendation at the semantic level. The results show that the proposed algorithm can effectively recommend courses for learners and has higher values on precision, recall, and F1 than the traditional recommendation algorithm.