The invention relates to a charging pile with a dampproof function. The charging pile comprises a body and a charging gun and further comprises a drying mechanism and a rainproof mechanism. The rainproof mechanism comprises a sleeve ring, a driving assembly and a cover plate. The driving assembly comprises a motor, a rotary rod and a connecting rod, and the drying mechanism comprises a filtering screen, a power assembly, a rotary assembly, a connecting assembly, a connecting box, a piston, a movable plate, a fixed box, a feeding pipe, a discharging pipe, an output pipe, a limiting assembly and two first springs. According to the charging pile with the dampproof function, the interior of the body can be dried and dehumidified through the drying mechanism, and it is avoided that the interior of the body is too damp, and consequently the normal work of electronic elements in the body is influenced; and by means of the rainproof mechanism, the charging gun is covered, a rainproof functionis achieved, the probability that the charging gun is corroded by rainwater is reduced, and safety is improved.