This paper studies the optimal underwater depth of the sonar, which is released from an anti-submarine helicopter into shallow sea.The operating distance of the sonar in active working mode is not only related to the sound speed profile of the sea area and the performance of the equipment,but also related to the underwater depth of the sonar.Firstly, BELLHOP model is used to simulate and analyze the acoustic propagation characteristics under three conditions:thermocline sound speed profile, positive sound speed profile and negative sound speed profile.Secondly, the probability distribution of a submarine sailing at different depths under different sound speed profiles is studied, and the model of submarine motion law is established and analyzed.The results show that the probability distribution of a submarine sailing at different depths is different under different sound speed profiles.Finally, by using the probability distribution of a submarine sailing at different depths, the average detection distance of the sonar at different underwater depth is calculated to obtain the optimal underwater depth of the sonar under different sound speed profiles, which can give full play to the performance of sonar equipment.