Intelligent ship technology is currently an international research hotspot, and model predictive control is widely used in the path-tracking control of intelligent vehicles. To construct an intelligent ship anti-disturbance path-tracking control method, firstly, an environmental disturbance model was constructed with the actual meteorological data of the target sea area. Secondly, the Fossen ship equation of motion is linearized and discretized as the ship motion model. Thirdly, the expression of the prediction equation is derived from the ship motion model. Fourthly, the cost function is constructed by using the polar diameter and polar angle values of the ship. Fifth, the power function in the cost function is replaced with an exponential function to obtain an improved cost function. Sixthly, according to the Lyapunov theory and the MPC terminal constraint theory, the stability of the improved cost function is verified. Seventh, different test paths are set up, the environmental disturbance model is taken as the external disturbance, the ship motion model, the prediction equation, and the improved cost function are used to design the anti-disturbance path-tracking control algorithm according to the model prediction control idea for simulation experiments. Finally, different MATLAB simulation results show that the improved cost function can resist disturbance of the external wave, current, and wind, and effectively track the target path. Therefore, this study provides a reference for improving the navigation safety of ship path-tracking.