To solve the problems such as the distribution of fault diagnosis information and the difficulty of knowledge sharing and reuse, a model of ontology-based fault diagnosis knowledge management system was introduced. According to the characteristics of the knowledge resources for fault diagnosis, Structure Ontology (StrOnto), Testing Ontology (TestOnto) and Fault Ontology (FaultOnto) were constructed. The fault tree generation algorithm based on the connection of heterogeneous ontologies was put forward to achieve the goal of knowledge sharing and reuse. An ontology-based fault diagnosis knowledge management system of 4L-20/8 two-stage air compressor was established. This system can provide more precise knowledge retrieval and diagnostic decision-making services for business users. It can also provide conditions for intelligent equipment maintenance.