Trajectory prediction is an important support for analysing the vessel motion behaviour, judging the vessel traffic risk and collision avoidance route planning of intelligent ships. To improve the accuracy of trajectory prediction in complex situations, a Generative Adversarial Network with Attention Module and Interaction Module (GAN-AI) is proposed to predict the trajectories of multiple vessels. Firstly, GAN-AI can infer all vessels’ future trajectories simultaneously when in the same local area. Secondly, GAN-AI is based on adversarial architecture and trained by competition for better convergence. Thirdly, an interactive module is designed to extract the group motion features of the multiple vessels, to achieve better performance at the ship encounter situations. GAN-AI has been tested on the historical trajectory data of Zhoushan port in China; the experimental results show that the GAN-AI model improves the prediction accuracy by 20%, 24% and 72% compared with sequence to sequence (seq2seq), plain GAN, and the Kalman model. It is of great significance to improve the safety management level of the vessel traffic service system and judge the degree of ship traffic risk.