This paper introduces the sparrow search algorithm–support vector regression (SSA-SVR) for the first time to improve the precision of mathematical modelling for ship motion through parameter identification. To address the nonsmoothness in ship motion, this study proposes a multistrategy enhanced modelling method named the improved SSA-SVR (ISSA-SVR) for predicting ship motion. Using the KRISO container ship (KCS) test data, this study establishes first-order linear response, second-order nonlinear response, and manoeuvring model group mathematical models through ISSA-SVR identification. The generalisability of the models derived from support vector regression, backpropagation neural networks, particle swarm optimisation-SVR, SSA-SVR, and ISSA-SVR is validated using distinct data from different samples. The results show that the algorithmic model proposed herein excels in prediction compared with other algorithms, thus highlighting its superior generalisation. Furthermore, the proposed method offers solutions with increased accuracy and improved stability for modelling ship motion.