In many sea areas, toxic and harmful chemicals exceed the standard seriously, which not only has a very bad impact on the survival of marine organisms, but also makes the safety of edible groundwater damaged. With the continuous development of artificial intelligence and deep learning, it is the most efficient and safe method to detect seawater with unmanned ship. By processing and fusing the images transmitted by the two radars, the common advantages of the two sensors are integrated, and the comprehensiveness of the UAV's perception of the surrounding environment is improved. In order to improve the accuracy and safety of unmanned aerial vehicle (UAV) offshore operation, this study designs an electric propulsion unmanned ship and its automatic control system according to the requirements of water quality sampling. Based on the theory of small body, the model of unmanned ship with the least resistance and the best safety is designed. According to the requirements of water quality sampling in the sea area, the collection and analysis system of six elements of water quality is equipped. The Realizable k-e turbulence model is used to simulate the self recovery ability of unmanned ship under wave disturbance. Theoretically, the unmanned ship can realize self righting in 4.25 s. And in the actual navigation, the unmanned ship can effectively avoid obstacles, and the basic information of sea water quality is within the specified range. The unmanned ship constructed in this study can be used as an auxiliary tool for water quality detection. By comparing with various study method, the proposed method obtains better performance.