A modified Elman neural network controller is proposed to control the mover of a permanent magnet linear synchronous motor (PMLSM) servo drive to track periodic reference trajectories. First, the dynamic model of the PMLSM drive system is derived. Next, a modified Elman neural network is proposed to control the PMLSM. Moreover, the connective weights of the modified Elman neural network are trained online by back-propagation (BP) methodology. However, the learning rates of the online-training weights are usually selected by trial-and- error method, which is time-consuming. Therefore an improved particle swarm optimisation (IPSO) is adopted in this study to adapt the learning rates in the BP process of the modified Elman neural network to improve the learning capability. Finally, the control performance of the proposed modified Elman neural network controller with IPSO is verified by the simulated and experimental results.