This paper studies the three‐dimensional (3‐D) dynamic trajectory tracking control of an autonomous underwater vehicle (AUV). As AUV is a typical nonlinear system, each degree of freedom is strongly coupled, so the traditional control method based on the nominal model of AUV cannot guarantee the accuracy of the control system. To solve this problem, we first propose a prediction model based on a radial basis function neural network (RBF‐NN). The nonlinearity of AUV is learned and modeled offline by RBF‐NN based on previous data. This model can reflect the time sequence state and control variables of AUV. Secondly, to avoid the overfitting problem in network training based on the traditional gradient descent method, a new adaptive chaotic sparrow search algorithm (ACSSA) is proposed to optimize the network parameters, to improve the full approximation ability of RBF‐NN to nonlinear systems. To eliminate the steady‐state error caused by external interference during AUV trajectory tracking, a nonlinear optimizer is designed by updating the deviation of the NN model output layer. In each sampling period, the predictive control law is calculated online according to the deviation between the predicted value and the actual value. In addition, the stability analysis based on the Lyapunov method proves the asymptotic stability of the controller. Finally, the 3‐D dynamic trajectory tracking the performance of AUV under different external disturbances is verified by MATLAB/Simulink, and the results show that the proposed controller is more efficient and robust than the standard model predictive controller (MPC) controller and the standard NN model predictive controller (NNPC).