Community detection is a way to understand the mesoscale characteristics of networked systems and has received much attention recently. Most existing community detection methods suffer from several problems including; weak stability due to employing a randomness factor, requiring the number of communities before starting the community identification process, and unable to recognize communities of various sizes. To overcome these challenges, in this paper a novel subspace-based core expansion method is proposed for identifying non-overlapping communities. The proposed method consists of three main steps. In the first step, the graph is mapped to a low dimensional space using a linear sparse coding method. The main idea behind the mapping strategy is that each data point within a combination of subspaces can be represented as a linear combination of other points. In the second step, a novel node ranking strategy is developed to calculate the goodness of nodes to be considered in identifying community cores. Finally, a novel label propagation mechanism is proposed to form final communities. Several experiments are performed to evaluate the effectiveness of the proposed method on real and synthetic networks. Obtained results reveal the better performance of the proposed method compared to some baseline and state-of-the-art community detection methods.