In the detection of surface defects in underwater structures, traditional methods using manual diving are inefficient. Equipment such as underwater high-definition cameras and underwater laser imaging face significant signal attenuation in deep and turbid environments, and the information contained in two-dimensional sonar images is limited, making it difficult to meet accuracy requirements. To address these shortcomings, a detection method based on sonar imaging for underwater docks using three-dimensional (3D) reconstruction is proposed. This method first reduces environmental interference through preprocessing. Then, emit sound waves towards the underwater target and receive the returning signals, which are converted into digital signals. Next, perform 3D modeling and visualization. Finally, a detailed analysis of the 3D images is conducted to identify, analyze, and assess the severity and distribution patterns of defects. The experimental results show that the 3D scanning sonar imaging detection technology can effectively detect targets and accurately identify misalignment in caisson joints, meeting practical application requirements.