The invention discloses a wind-driven generator yaw device with a locking function. The wind-driven generator yaw device comprises a tower frame rod, a supporting bearing is fixedly connected in a groove in the top of the tower frame rod, a rotating block is fixedly connected to the inner wall of the supporting bearing, the top of the rotating block penetrates through the supporting bearing and extends to the outside of the supporting bearing, a rotating plate is fixedly connected to the top of the rotating block, a mounting block is fixedly connected to the middle point of the top of the rotating plate, and a rotating shell is fixedly connected to the bottom of the rotating plate. According to the wind-driven generator yaw device with the locking function, a protection plate, limiting rods, a movable ring, limiting blocks, a limiting ring, limiting grooves, a movable plate, first springs, vertical plates, transverse rods, baffle plates and second springs cooperate with one another, sothat the wind-driven generator yaw device has the locking function, the yaw device can be conveniently limited by a worker, the situation that a fan blade of a wind-driven generator deviates from a set angle due to the influence of external force is avoided, the power generation efficiency of the wind-driven generator is improved, and great convenience is brought to a user.