In the field of computer vision, trajectory prediction is one of hottest isssues. based on the study of the existing markov chains algorithm on the trajectory prediction of the moving target, the predict model had no taken the trajectory of abnormal behavior into account. in this paper, the model can re-learn their own adjustment by capturing data of ab normal behavior, and can quickly detect abnormal trajectory behavior, and update the transition probability of prediction model. simulation results show that the markov chains model through its own re-learning has highly accuracy in the trajectory prediction.