A novel ultrasonic pulse echo method is proposed for flow pattern identification in a horizontal pipe with gas–liquid two-phase flow. A trace of echoes reflected from the pipe’s internal wall rather than the gas–liquid interface is used for flow pattern identification. Experiments were conducted in a horizontal air–water two-phase flow loop. Two ultrasonic transducers with central frequency of 5 MHz were mounted at the top and bottom of the pipe respectively. The experimental results show that the ultrasonic reflection coefficient of the wall–gas interface is much larger than that of the wall–liquid interface due to the large difference in the acoustic impedance of gas and liquid. The stratified flow, annular flow and slug flow can be successfully recognized using the attenuation ratio of the echoes. Compared with the conventional ultrasonic echo measurement method, echoes reflected from the inner surface of a pipe wall are independent of gas–liquid interface fluctuation, sound speed, and gas and liquid superficial velocities, which makes the method presented a promising technique in field practice.