Abstract: The key procedure for sound speed profile (SSP) inversion is the accurate determination of eigenray and precise measurement of corresponding transmission time. Horizontal deflection often occurs when a ray propagates in shallow water with an irregular sea bottom, which makes it difficult to determine eigenray trajectory and transmission time. A new method for seeking eigenray in three dimensions was proposed in this paper. The influences of horizontal deflection on transmission time were first analyzed, and then transmission time of explosive sound and quantum particle swarm were used as cost function and optimization algorithm to invert SSP for some area of South China Sea, based on experimental data. Results indicate that horizontal deflection has critical effect on transmission time when the bottom gradient is great. Considering horizontal deflection can greatly improve the accuracy of eigenray transmission time calculation and enhance the precision of SSP inversion dramatically.