Aiming at the problem that the nearest neighbor parameters need to be set manually in density peak clustering algorithm based on shared nearest neighbor, a density peak clustering algorithm based on adaptive nearest neighbor parameters was proposed. Firstly, the proposed nearest neighbor parameter search algorithm was used to automatically obtain the nearest neighbor parameters. Then, the clustering centers were selected through the decision diagram. Finally, according to the proposed allocation strategy of representative points, all sample points were clustered through allocating the representative points and the non-representative points sequentially. The clustering results of the proposed algorithm was compared with those of the six algorithms such as Shared-Nearest-Neighbor-based Clustering by fast search and find of Density Peaks (SNN?DPC), Clustering by fast search and find of Density Peaks (DPC), Affinity Propagation (AP), Ordering Points To Identify the Clustering Structure (OPTICS), Density-Based Spatial Clustering of Applications with Noise (DBSCAN), and K-means on the synthetic datasets and UCI datasets. Experimental results show that, the proposed algorithm is better than the other six algorithms on the evaluation indicators such as Adjusted Mutual Information (AMI), Adjusted Rand Index (ARI) and Fowlkes and Mallows Index (FMI). The proposed algorithm can automatically obtain the effective nearest neighbor parameters, and can better allocate the sample points in the edge region of the cluster.