The invention discloses a cleaning mechanism for a filter. The cleaning mechanism for the filter comprises a stand, a recycling box, a base, a front guiding plate, a plurality of roll shafts, an inlet, a cleaning box, a cleaning pipe, flushing mechanisms, an outlet, a guiding plate, a fan, a conveying net belt and a second recycling box, wherein the base is fixed to the upper end of the stand, thesealed cleaning box is arranged at the upper end of the base, the left side of the cleaning box is provided with the inlet, the right side of the cleaning box is provided with the outlet, the inlet is higher than the outlet, the multiple roll shafts arranged side by side are arranged in the cleaning box, the roll shafts are horizontally arranged, and the multiple roll shafts are sequentially staggered downwards from the inlet to the outlet; the cleaning pipe is arranged on the upper sides of the roll shafts, the flushing mechanisms arranged face to face are arranged at the positions, close totwo ends, of the roll shafts, the flushing mechanisms are connected with a detergent, and the flushing mechanisms are used for being inserted into the two ends of the cylinder type filter, and flushfrom the interior of the filter to the outer part; and the guiding plate is arranged on the outer side of the outlet, and the conveying net belt fixed to the stand is arranged at the tail end of the guiding plate. The cleaning mechanism can achieve automatic cleaning, saves manpower, lowers the cost and improves the efficiency.