This paper discusses the construction and application of the knowledge map of the Civics curriculum. Firstly, the courses’ ontology concept and hierarchical relationship are identified, and their attributes and relationships are defined. Then, BiLSTM-CRF model was used to extract the Civics entities, and relevant data were obtained from websites using crawler technology and regular expressions. The keyword screening technique was used to ensure the Civic politics relevance of the data. The data storage adopts RDF triples and Neo4j graph database to construct a visualization system for Civics teaching. The experimental results show that the BiLSTM-CRF model performs well in extracting Civics entities, mainly in specialized knowledge, and achieves high accuracy. The study effectively improves the efficiency and quality of Civics learning through knowledge mapping and visualization techniques.