A new vehicle motion trajectory prediction algorithm was proposed by using the attention mechanism based on the classic convolutional social long-short term memory (LSTM) trajectory prediction algorithm. Firstly, the lateral attention mechanism was introduced to assign different weights to neighboring vehicles. The features obtained from the historical trajectory of the vehicle via LSTM were taken as global features, and the trajectory features were extracted as local features through convolution pooling. The two features were fused as the overall neighbor feature information for trajectory prediction. Secondly, the Encoder-Decoder framework of traditional trajectory prediction was improved, and a vertical attention mechanism on historical position was introduced, so that each moment of prediction could use the historical information, which was most relevant to the current moment. The improved model was verified on the US101 and I80 datasets provided by NGSIM, and the results show that the proposed trajectory prediction algorithm can obtain more accurate future trajectories than other algorithms. © 2020, Zhejiang University Press. All right reserved.