Social networks on the dark web are rich in data that provides valuable insight into the nature of the activities on the dark web and human behaviors related to these activities. It also encompasses a diversity of ideologies, interests, and thought patterns associated with illicit activities and businesses on the dark web. For this reason, social networks on the dark web constitute a powerful tool and a profuse data source for various investigative work. However, such investigations encounter considerable challenges related to the massive volumes of textual data, analyzing it effectively, and extracting knowledge from it. This knowledge can be used in various investigations and studies when representing it in ontologies as a unified and integrative data source. In this paper, we introduce a novel approach for extracting and representing knowledge hidden in dark web communities through topic modeling and ontology learning methods. We start from the conceptual design of the ontology and employ several stages of text processing and analysis to achieve the desired knowledge graph, DarkOnto. These stages include data cleaning and preprocessing, topic modeling using correlated topic model (CTM), class‐topic similarity estimation, ontology construction, ontology population, and ontology evaluation, where the proposed approach achieved high results. Furthermore, we discuss the results, limitations, challenges, and future work. This paper presents a promising approach for extracting hidden valuable knowledge from dark web communities where investigating and conceptualizing criminal communities can be conducted efficiently.