Nowadays, more and more underwater electricity or communication cables and oil or gas pipelines have been installing. Equipment aging and damages to them have caused series of accidents, resulting in huge economic loss and environmental pollution. This paper proposes a long distance underwater linear object detection method based on range-gated optical imaging, which can help the maintenance and inspections of underwater cables and pipelines. The whole object detection algorithm can be divided into three stages: image enhancement, edge detection and object detection. In the image enhancement step, The system deals with the low contrast, blur and noises characteristics of underwater images by means of contrast normalization, median filtering, wavelet transform, and finally gets high quality images. Then, the Canny operator was used to extract object's edge features. Finally, for the emergence of noise edges, a robust algorithm named Random Sample Consensus was chosen to accurately detect linear object and estimate its parameters such as position and direction. This algorithm has been tested on the experimental data in the boat tank of Huazhong University of Science and Technology, collected with a range-gated imaging system. The results show that the algorithm can effectively detect underwater curved-linear objects, with the detection rate achieving 96%, and the effective detection range can be up to 5 times the length of the underwater decay.