Previous studies on user–item interaction graphs have typically concentrated on simple interactions, often overlooking the significant role of user intent in shaping these interactions. While some recent research has explored intent relationships to enhance modeling, these approaches mainly focus on user preferences derived from interactions, ignoring the knowledge information with good interpretation in knowledge graphs. In addition, some recent work usually utilize undenoised graph structure information to learn the node representations, which introduces plenty of noise and impedes the well learning of users’ preference. In this paper, we utilize the rich interpretable knowledge information in the knowledge graph to design a novel knowledge-driven hierarchical intent modeling framework called KHIM. The focus is on designing a hierarchical user intent modeling process and an intent-based multi-view contrastive learning mechanism. The former extracts both the popular and personalized preferences of users from attribute tuples within the knowledge graph at the global-level and local-level, respectively. For global level, we capture the user’s true intents from positive view and augment the positive intent representation with negative view. While the latter generates high-quality user and item representations through multi-level cross-view contrastive learning. Two data augmentation strategies are designed during the contrastive process to mitigate the effects of noise in the learning process. Additionally, we also designed a neighbor filtering strategy based on semantic view to obtain more neighbor semantic information of user and item nodes, so as to further improve the recommendation performance. Experimental results on three benchmark datasets demonstrate that KHIM significantly outperforms various state-of-the-art approaches, highlighting its effectiveness in leveraging knowledge graph information for better recommendations.