The invention discloses a cleaning device for a solar photovoltaic panel and a cleaning method of the solar photovoltaic panel. A housing is of a box-like structure with a bottom opening, one end of the housing is provided with a guide groove, one end of a shovel plate is of an arc-shaped structure, the other end of the shovel plate is provided with a sliding block, a second connecting rod is arranged at the top of the sliding block, the top of the guide groove is provided with a top plate, the top plate is provided with a fourth through hole, the end portion of the second connecting rod passes through the fourth through-hole to mount the shovel plate in the guide groove, the shovel plate can move in the axial direction of the guide groove, the second connecting rod is sleeved with a thirdspring, the third spring is located between the sliding block and the top plate, a second limiting block is arranged at one end, away from the sliding block, of the second connecting rod, a bottom plate of the shovel plate is provided with a supporting walking wheel, a cleaning roller is installed in the shell, the end face of one side of the shovel plate is provided with an end plate, the end plate is provided with a first through hole, one end of a snow guiding assembly penetrates through the first through hole to arrange the snow guiding assembly in the shovel plate, a walking device is mounted on the two sides of the housing, and a power device can drive the cleaning roller and the snow guiding assembly to rotate.