With the development of global position system (GPS), wireless technology and location aware services, it is possible to collect a large quantity of trajectory data. In the eld of data mining for moving objects, the problem of anomaly detection is a hot topic. Based on the development of anomalous trajectory detection of moving objects, this paper introduces the classical trajectory outlier detection (TRAOD) algorithm, and then proposes a density-based trajectory outlier detection (DBTOD) algorithm, which compensates the disadvantages of the TRAOD algorithm that it is unable to detect anomalous defects when the trajectory is local and dense. The results of employing the proposed algorithm to Elk1993 and Deer1995 datasets are also presented, which show the effectiveness of the algorithm.