Inspired by the lateral line system of fish, the artificial lateral line system (ALLS) was proposed for underwater target detection. The dipole was treated as a standard and simplified target and most researchers focused on the dipole at a fixed position. The trajectory tracking of moving dipole was barely considered. In this paper, a new trajectory tracking method of moving dipole was proposed. Firstly, based on the instant pressure amplitude and loss function, the dipole trajectory was tracked by particle swarm optimization (PSO). Then, the PSO tracked trajectory was optimized by the recursive filter such as Kalman filter (KF) and particle filter (PF) to reduce the tracking error. The experiment result showed that when the trajectory of the dipole was rectangle, the target tracking accuracy of PSO was competitive compared with the Gauss-Newton method. The mean error distance (MED) of PSO was 12.51mm. The PF showed better optimization performance than KF in this paper, and the corresponding MED of PF was 7.064mm. The main factor that caused the tracking error was the pressure mismatch. In the simulation, when the pressure mismatch was not considered, the performance of the proposed dipole tracking method was highly improved.