The invention discloses an automatic cleaning valve. The automatic cleaning valve comprises a valve body, a water stop valve, a water inlet, a smashing grille, a connecting flange, smashing bars, a motor, a filter screen, a handle, a water outlet, a drain outlet, a timer, a sealing cover, a protective shell, an electric push rod, a front iron brush, a rear iron brush, a first electromagnetic valveand a second electromagnetic valve. According to the automatic cleaning valve, the timer, the first electromagnetic valve, the second electromagnetic valve and the electric push rod are matched withone another in a fluid conveying system, the inside of the valve body can be cleaned regularly, the condition that excessive sediments exist on the inner wall of the valve body to influence the waterflow speed is avoided, and no manual intervention is required. Large-sized rubbish in sewage can be smashed through the smashing grille so as not to block a water inlet pipe, and the problem that manual regular cleaning is difficult is solved. Great convenience is brought about to cleaning of the smashing grille due to movable installation of the filter screen; and meanwhile, the rubbish which isnot smashed can be filtered and a guarantee is provided for regular work of the valve.