In the legal domain, ontologies organize legal concepts and their relationships, while knowledge graphs connect these concepts to specific entities in legal documents. This study proposes a solution for integrating ontology and knowledge graph, called Legal-Onto model, to construct a knowledge base of an intelligent retrieval system in the legal domain. The Legal-Onto model combines ontology as the conceptual layer and knowledge graphs as the implementation layer for representing the content of legal documents. This relational model is integrated with a structure of knowledge graph to identify relations between concepts and entities extracted from ontology in the determined domain. Moreover, this research addresses inherent challenges in semantic-based knowledge-driven search. The specific objective is to accurately extract relevant information from legal documents to respond to entered queries. The experimental results show that this method is more effective than state-of-the-art methods in natural language processing and large language models, which are without specific legal domain knowledge.