Natural neighbor is known for its ability to adaptively identify the nearest neighbors in a dataset, but it sometimes can not accurately cluster in datasets with density variations. To overcome this drawback, this paper proposes a hierarchical clustering algorithm based on natural local density peaks (HC-NLDP). HC-NLDP mainly consists of partition and merge. Firstly, HC-NLDP searches natural local density peaks to form sub-clusters. This effectively solves the problem that points in low-density regions are difficult to cluster accurately. Secondly, HC-NLDP computes the shared similarity between every pair of sub-clusters. The shared similarity describes the relevance between sub-clusters. When confronted with datasets exhibiting density variations, the shared similarity can ensure that HC-NLDP achieves superior clustering performance. Numerical experiments based on synthetic and real datasets demonstrate the effectiveness and superiority of HC-NLDP.