The invention provides a testing device for measuring flow-induced noise and vortex-induced noise of a marine pipeline, which comprises a pipe sleeve, a connecting mechanism, a damping mechanism, a diversion grid and a self-contained hydrophone, the pipe sleeve is mounted on the outer surface of the marine pipeline, one end of the connecting mechanism is placed in the pipe sleeve, the other end of the connecting mechanism is connected with the damping mechanism, and the damping mechanism is connected with the diversion grid, the self-contained hydrophone is placed in the diversion grid; according to the test device for measuring the flow-induced noise and the vortex-induced noise of the marine pipeline, the acoustic near-field effect caused by insufficient distance between the hydrophone and the submarine pipeline in a conventional test method is avoided, and the influence of large vortex pulsating pressure on the hydrophone is eliminated by utilizing the flow guide grid, the low-frequency interference caused by external ocean current in the testing process is reduced, the vibration reduction mechanism design is adopted, the normalization of the flow-induced noise and the vortex-induced noise of the ocean pipeline is more accurate, the measurement result is more reliable, and technical support is provided for the test measurement of the flow-induced noise and the vortex-induced noise of the ocean pipeline.