The long stator track for high speed maglev trains has a tooth-slot structure. The sensor obtains precise relative position information for the traction system by detecting the long stator tooth-slot structure based on nondestructive detection technology. The magnetic field modeling of the sensor is a typical three-dimensional (3-D) electromagnetic problem with complex boundary conditions, and is studied semi-analytically in this paper. A second-order vector potential (SOVP) is introduced to simplify the vector field problem to a scalar field one, the solution of which can be expressed in terms of series expansions according to Multipole Theory (MT) and the New Equivalent Source (NES) method. The coefficients of the expansions are determined by the least squares method based on the boundary conditions. Then, the solution is compared to the simulation result through Finite Element Analysis (FEA). The comparison results show that the semi-analytical solution agrees approximately with the numerical solution. Finally, based on electromagnetic modeling, a difference coil structure is designed to improve the sensitivity and accuracy of the sensor.