Modeling errors and external disturbances have significant impacts on the control accuracy of robotic arm trajectory tracking. To address this issue, this paper proposes a novel method, the neural network terminal sliding mode control (ALSSA-RBFTSM), which combines fast nonsingular terminal sliding mode (FNTSM) control, radial basis function (RBF) neural network, and an improved salp swarm algorithm (ALSSA). This method effectively enhances the trajectory tracking accuracy of robotic arms under the influence of uncertain factors. Firstly, the fast nonsingular terminal sliding surface is utilized to enhance the convergence speed of the system and achieve finite-time convergence. Building upon this, a novel multi-power reaching law is proposed to reduce system chattering. Secondly, the RBF neural network is utilized to estimate and compensate for modeling errors and external disturbances. Then, an improved salp swarm algorithm is proposed to optimize the parameters of the controller. Finally, the stability of the control system is demonstrated using the Lyapunov theorem. Simulation and experimental results demonstrate that the proposed ALSSA-RBFTSM algorithm exhibits superior robustness and trajectory tracking performance compared to the global fast terminal sliding mode (GFTSM) algorithm and the RBF neural network fast nonsingular terminal sliding mode (RBF-FNTSM) algorithm.