Abstract Complex network analysis is inspired by empirical studies of real-world networks such as computer networks, technology networks and social networks. The analysis of community structure in complex networks is understood as an important issue by the research society. A community is a set of nodes in a network where the density of connections is high. The insight in the literature shows many approaches to identify influential nodes, but these approaches only lead to finding community centres. Meanwhile, clustering techniques are effectively used for community detection, where they can reveal group structure and hidden connections by considering topological and demographic information. This article presents an ensemble clustering algorithm based on influential nodes to improve community detection in complex networks. Considering different characteristics of the network, the proposed method seeks to discover common interests between users and their behaviours to identify the most suitable communities. First, a set of influential nodes are identified as community centres. Then, these centres are considered as cluster centres. After that, primary clusters are created based on the determined centres. Finally, the primary clusters are reclustered to form the final clusters. Here, the final clusters are considered as communities of users in the network. The simulation has been performed on real-world networks and the results confirm the effectiveness of the proposed method. Specifically, the communities identified by the proposed method are 2.1% better than the best existing state-of-the-art method in terms of modularity. Keywords: complex network; community detection; influential nodes; ensemble clustering.