The invention provides a robot for cleaning a metal pipeline by laser light. The robot comprises a wheel type trolley, a connecting component and an equipment cabinet. The wheel type trolley comprises a laser light output component, a camera shooting component and a dust collection mechanism. The connecting component comprises an optical fiber, a cable, a data line and a dust collection pipe. The equipment cabinet comprises a laser device, an optical fiber coupler, a power driving component, a water cooling machine, a dust collector and an industrial computer. Laser light is output by the laser device, coupled into the optical fiber through the optical fiber coupler and transmitted to an optical fiber collimation system in the laser light output component loaded on the wheel type trolley through the optical fiber, and then passes through a scanning galvanometer and a rotary accessory component in the laser light output component, so that a linear light spot capable of rotating by 360 degrees is output. The linear light spot rotates by 360 degrees to scan the inner wall of the metal pipeline, and therefore the purpose of cleaning the pipeline is achieved. The robot is used for cleaning the metal pipeline on line, and therefore the cleanness of the metal pipeline is kept on line.