Waves are an oceanic phenomenon that involve intricate mechanisms of generation and dynamic processes. In the past, wave forecasting mainly primarily depended on complicated numerical models; however, these models are computationally expensive and time-consuming. As a result, different deep learning techniques have been tested. In the South China Sea, the generation and propagation of ocean waves are impacted by many factors, which are affected including the swell and typhoon as well as complex topography, making most of the deep learning methods limited in their accuracy. To address this issue, a Spatio-temporal network integrating multivariate attention mechanisms, MA-TrajGRU, is introduced and applied to forecast the ocean wave conditions during the typhoon process in the South China Sea. We simulated wave data for 2017–2021 using SWAN and validated it against buoy observations. The forecast data includes significant wave height (Hs) and mean wave period (Tm) with a spatial resolution of 0.1° and a temporal resolution of 1 h. Wave forecasting experiments were performed 24 h in advance to evaluate MA-TrajGRU. The errors of MA-ConvLSTM and MA-TrajGRU with the multivariate attention mechanism addition are lower with MAE of 0.136 m, MSE of 0.0582 m2, and PCC of 0.9555 for Hs; MAE of 0.2352 s, MSE of 0.1393 s2, and PCC of 0.9708 for Tm. We conducted experiments on wave forecasting during typhoon processes and observed that MA-TrajGRU performs much better than commonly used Spatio-temporal network models. Thus, MA-TrajGRU can forecast the spatial and temporal distribution of large-scale ocean waves in the South China Sea, especially during typhoons. Therefore, it has great potential for disaster prevention and mitigation in marine engineering.