Very short-term ship motion forecasting aims to predict future movements using historical ship motion data. While ship motion features both temporal and frequency characteristics, the latter is often neglected. This paper proposes a fully adaptive time–frequency coupling forecasting model using self-attention mechanism based on the Deep Operator Network (DeepONet), abbreviated as TFD. The multi-head attention layers enable the trunk net to adaptively learn the relationships between different frequencies in the frequency domain and assign varying weights accordingly. Thus, compared to the Fourier transform and multilayer perceptron-net enhance model based on DeepONet (FMD), which relies on manually specified filter frequencies, the TFD model is capable of fully learning the motion patterns in both the time and frequency domains, establishing nonlinear mapping relationships between them. It exhibits greater interpretability and generalization. The TFD model is tested for accuracy and generalization using ship motion data from the Iowa University experimental tank. The results indicate that, compared to the DeepONet and FMD, the TFD model reduces the mean square error (MSE) by up to 64.72% and 52.45%, with an average reduction of 55.57% and 42.47%. In terms of generalization, the forecasting MSE is reduced by up to 65.04% and 46.08%. Compared to the DeepONet and FMD, the proposed TFD model demonstrates significant improvements in forecasting horizon and generalization, providing a notable advantage in very short-term ship motion prediction applications.