The invention relates to a solar charging pile with waterproof function, including principals, Charging device, Heat sink and photovoltaic panel, It also includes waterproofing mechanisms and two cleaning mechanisms, A waterproof mechanism includes a lifting assembly and a closing assembly, The cleaning mechanism comprises a housing, Second motor, first turntable, fixed shaft, second turntable, Conveyor belts and nozzles, in the solar charging pile with waterproof function, Through the waterproof mechanism, A main body can be raise off that water surface and shield from the heat dissipation port by a tarpaulin, Avoid rainwater entering the interior of the charging pile, The solar charging pile with waterproof function prevents dampness damage to internal circuits and electronic components,prolongs the service life of the charging pile and ensures the normal operation of the charging pile. The cleaning mechanism can control the nozzle to clean the photovoltaic panel comprehensively, improves the power generation effect of the photovoltaic panel, ensures the normal power supply of the photovoltaic panel, and greatly improves the practicability and reliability of the charging pile.