The deficiencies of massive data like storage difficulty, computation inefficiency, and information redundancy call for ship trajectory compression. While most studies on ship trajectory compression have one or more of the following drawbacks: the drawback of low compression efficiency; the problem resulted from error ship static information when the distance threshold is set based on ship length or width; poor compression quality for some trajectories, which is caused by experience-based optimal threshold. To solve these problems, we propose the ADP (Adaptive-threshold Douglas-Peucker) algorithm based on DP (Douglas-Peucker) algorithm. By determining the key points of each trajectory through the threshold change rate, ADP no longer relies on ship static information and makes it easier to determine the threshold, which is what traditional algorithms cannot achieve. Additionally, we use the advantage of matrix operation and the method of reducing points to improve the algorithm's computation efficiency. To verify the feasibility and superiority of the proposed algorithm, we compared our algorithm with DP algorithm, Partition-DP algorithm and Sliding Window algorithm from four aspects, namely, compression rate, Synchronous Euclidean distance, Length Loss Rate and running time. The experimental results prove that our algorithm has advantages over the other three algorithms, especially in threshold setting.