Accurately predicting the long-term trajectory of a surface drifting buoy (SDB) is challenging. This paper proposes a promising solution to the SDB trajectory prediction based on artificial intelligence (AI) technologies. Initially, a scalable mathematical model for trajectory prediction is developed, transforming the challenge of predicting trajectory points into predicting velocities in eastward and northward directions. Subsequently, a four-layer trajectory prediction calculation framework (FLTPCF) is established, outlining a complete workflow for the real-time online training of marine environment data and SDBs’ trajectory prediction. Thirdly, for facilitating accurate long-term trajectory prediction, a hybrid artificial neural network trajectory prediction model, named CNN–BiGRU–Attention, integrates a Convolutional Neural Network (CNN), Bidirectional Gated Recurrent Unit (BiGRU), and Attention mechanism (AM), tuned for spatiotemporal feature extraction and extended time-series reasoning. Extensive experiments, including ablation studies, comparative analyses with state-of-the-art models like BiLSTM and Transformer, evaluations against numerical methods, and adaptability tests, were conducted for justifying the CNN–BiGRU–Attention model. The results highlight the CNN–BiGRU–Attention model’s excellent convergence, accuracy, and generalization capabilities in predicting 24, 48, and 72 h trajectories for SDBs with varying drogue statuses and under different sea conditions. This work has great potential to promote the intelligent degree of marine environmental monitoring.