A robust adaptive fuzzy neural network control (RAFNNC) algorithm is proposed based on a generalized dynamic fuzzy neural network (GDFNN), proportion-integral-differential (PID), and improved bacterial foraging optimization (BFO) algorithm, for heading the control of the unmanned marine vehicle (UMV) in the presence of a complex environment disturbance. First, the inverse dynamic model of the motion control of UMV is established based on the GDFNN for the uncertain disturbance caused by the complex environment disturbance. Then, the adaptive rate of the fuzzy neural network is designed based on the error between the real UMV heading angle and designed reference heading angle, so as to further adjust the weight parameter of the GDFNN, and then, the output control value of the neural network is obtained. In order to further reduce the computation amount and computation time of the RAFNNC, the parameters of the PID control algorithm were optimized in advance by using the improved BFO algorithm. The fractal dimension step size and the intelligent probe operation are integrated into the BFO algorithm, in order to optimize the operation time and accuracy of the algorithm. Stability of the designed RAFNNC algorithm for the heading control of the UMV in the presence of complex marine environment disturbance is proved by the Lyapunov stability theory, and the effectiveness and accuracy of the control algorithm proposed are verified by semi-physical simulation experiment carried out in our laboratory. INDEX TERMS Unmanned marine vehicle (UMV), heading control, robust adaptive fuzzy neural network control (RAFNNC), generalized dynamic fuzzy neural network (GDFNN), bacterial foraging optimization (BFO).