The invention discloses a high-temperature and high-pressure multi-phase flow dynamic visualization loop corrosion testing apparatus and a method thereof. The high-temperature and high-pressure multi-phase flow dynamic visualization loop corrosion testing apparatus comprises a medium displacement unit, an experiment parameter measurement unit, a visualization unit, a corrosion testing unit, a gas inlet valve, a circulation loop, a driving pump, a 1# end cover, a 2# end cover, a gas discharge valve and an H2S absorption device, wherein the experiment parameter measurement unit, the corrosion testing unit, the 1# end cover, the 2# end cover, the gas discharge valve and the H2S absorption device are arranged on the circulation loop, and the medium displacement unit is connected to the circulation loop through the driving pump. According to the present invention, the subcritical and supercritical fluids under the high-temperature and high-pressure environment can be realistically simulated, the shearing force can be measured, the erosion damage effect of the multi-phase flow corrosion medium on the corrosion inhibitor film and the corrosion product film can be quantitatively analyzed, and the online testing of the pipeline corrosion effect can be completed and the results are recorded.