Loop closure detection is the core of 3D laser-based SLAM to realize autonomous positioning and naviga-tion. Aiming at the problems of high complexity and low accuracy in current loop closure detection, a spherical harmonic energy with rotation invariance (SHE) and a spherical harmonic energy with the z-axis rotation invariance (SHZE) are first proposed in this paper. Combining the advantages of SHE and SHZE via a "two-step search", a novel loop closure detection algorithm for 3D laser-based SLAM, denoted as SH-LCD, is proposed. SH-LCD not only improves the richness of information extraction, but also reduces the computation complexity of loop closure detection, thus characterized by strong feature extraction ability and universality. Extensive loop closure detection evaluations on benchmark datasets including KITTI, NCLT, and Complex Urban, demonstrate that the detection accuracy of SH-LCD significantly outperforms the current state-of-the-art methods including Scan Context, M2DP, OverlapNet, etc. In addition, the efficiency of SH-LCD is high, and the time for operator calculation and operator matching are about 12.0 ms and 2.3 ms, respectively. This meets the real-time requirements of SLAM.