Trajectory prediction is a crucial tool for analyzing vessel motion behavior, assessing vessel traffic risks, and planning collision avoidance routes for intelligent ships. We propose a novel deep-learning architecture-based model Trajformer to perform the task of vessel trajectory prediction. By preprocessing AIS data, utilizing the LSTM to learn local dependencies, and self-attention mechanism to enhance the capacity of dependencies learning, Trajformer achieves multi-step vessel trajectory prediction. Inspired by time series preprocessing and forecasting tasks, we also propose Trajformer+SD, a simple yet effective approach that applies Series Decomposition on the input sequence. Our modal can effectively model the vessel trajectory and make predictions, as demonstrated by our experiments on three real-world vessel trajectory datasets. Compared to the sequence to sequence (Seq2Seq) and sequence to sequence with attention (Seq2Seq_attn) model, our proposed model exhibits a better performance in prediction tasks.