Due to the influence of the complex underwater environment, the sound speed constantly changes, resulting in the acoustic signal propagation trajectory being curved, which greatly affects the positioning accuracy of the underwater long baseline (LBL) system. In this paper, an improved LBL positioning method based on a B-spline surface for fitting the effective sound speed table (ESST) is proposed. Firstly, according to the underwater sound speed profile, the discrete ESST of each measurement station is constructed before the positioning test, and then, the node position of the B-spline surface is optimized by particle swarm optimization (PSO) to accurately fit the discrete ESST. Based on this, the improved LBL positioning method is constructed. In the underwater positioning test, the effective sound speed can be quickly found by measuring the time of arrival (TOA) of the acoustic signal and the target depth, and moreover, the target position parameters can be quickly and accurately estimated. The numerical simulation results show that the improved positioning method proposed in this paper can effectively improve the LBL positioning accuracy and provide the theoretical basis and the technical support for the underwater navigation and positioning.