The invention relates to a wind driven generator with a windproof function. The wind driven generator comprises a wind wheel, an electric generator, a restricting and safety mechanism, a tower and an energy storage mechanism. The wind wheel comprises a fan assembly, a sliding assembly and a positioning assembly; the sliding assembly comprises a support, a sliding block, a first hinged block, a second hinged block and a third hinged block; the positioning assembly comprises a motor, a first circular gear, a second circular gear, a positioning unit, an iron block and a positioning block; and a damping assembly comprises a damping block, a push rod, a damping ring and a damping cabin. The wind driven generator with the windproof function is ingenious in design and high in feasibility; and when the wind power is larger, the restricting and safety mechanism sends a revolution signal to a PLC (Programmable Logic Controller), and the PLC controls the sliding assembly to retract fan blades so as to be parallel to a rotary shaft, so that the sectional area of the wind driven generator is reduced, the stress surface is reduced, the thrust of wind on the wind driven generator is reduced, the windproof property of the wind driven generator is improved, and the safety of the wind driven generator is ensured.