The invention discloses a cleaning device for production and machining of metal protective fences. The cleaning device comprises a workbench and a three-way communicating vessel, a water storage tank is fixedly connected to the middle end of the bottom of the workbench, a clamping seat is fixedly connected to the upper end of the inner surface of the water storage tank, meanwhile, an activated carbon filtering layer is clamped to the inner surface of the clamping seat, second connecting plates are fixedly connected to the middle ends of the front side and the rear side of the workbench, a second motor is fixedly mounted on the back side of the second connecting plate located at the rear end of the workbench, and a rotating shaft is movably connected to the upper end of the back surface of the second connecting plate located at the front end of the workbench through a bearing. The device is provided with a first connecting plate, a sliding seat, a sliding device, a first electric telescopic rod, a third connecting plate, a first belt pulley, a first motor, a second belt pulley, a brush roller, the three-way communicating vessel, a pump machine, a spray head, the activated carbon filtering layer, a second electric telescopic rod, a pressing plate, a fourth connecting plate, a second connecting plate and the second motor, the cleaning effect of the device on the metal protective fences is effectively improved.