The invention provides a photovoltaic panel device with an anti-hail function. The device comprises a pedestal, two ends of the pedestal are pivoted with an installation frame, the installation framecomprises two opposite supporting rods, a photovoltaic panel is fixedly installed between the two supporting rods, the bottom ends of the supporting rods are fixedly provided with a circular box body,and the box body is driven by a drive motor; a plurality of first inserting holes are formed in the side, close to the base, of the box body, second inserting holes corresponding to the first inserting holes are formed in the end face of the base, two push rod motors are installed in the base, inserting rods are connected to the ends of output shafts of the push rod motors, the inserting rods arearranged corresponding to the second inserting holes and used for locking the first inserting holes and the second inserting holes, and locking of the installation frame is completed; and a protective cover is mounted at the top end of the installation frame. The photovoltaic panel device is novel in structure, can drive the photovoltaic panel to swing, and can drive the photovoltaic panel to bein an upright state under the condition of hail weather, so impact surfaces are reduced; and a protection structure is arranged, so damage of hail to the photovoltaic panel is further reduced.