The invention discloses a photovoltaic power generation system with a self-cleaning function, including a photovoltaic panel, a water spraying mechanism, a cleaning mechanism and a drive mechanism, the drive mechanism includes a slide rail, slide bars, screws and drive motors, the slide rail includes a first slide rail and a second slide rail, the first slide rail and the second slide rail are respectively located on the left and right sides of the photovoltaic panel, the cleaning mechanism is arranged on the slide bar and the left and right ends of the slide bar are slidably connected with the first slide rail and the second slide rail respectively, one end of the screw rod is connected with the slide rod, the other end is connected to the output of the drive motor, the self-cleaning of the photovoltaic panel is realized through the cooperative work of all the mechanisms, when the dust level reaches the situation of requiring cleaning, the driving motor starts, thereby driving the slide bar to slide up and down, and driving the brush head arranged on the slide bar to clean on the surface of the photovoltaic panel, and the water spraying mechanism cooperates with each other, thereby effectively solving the problem that manual cleaning is inconvenient before, and ensuring the power generation efficiency of the photovoltaic panel.