A power generation device in a lock body of a door lock is characterized by comprising an input shaft, an input gear, a gearing-up mechanism, a micro generator, a
clutch rotating shaft component and a lock body casing. Except the lock body casing, other parts are installed in the lock body, a sector gear is installed on the input shaft to rotate together with the input shaft, the input shaft and an outer
door handle are coaxial, and the input shaft is driven by the outer
door handle. An outside mechanism controls connection relations of the
clutch rotating shaft component and the input shaft by controlling a
clutch pin on the clutch rotating shaft component. When a door does not need to be opened, the outer
door handle drives the input shaft to rotate, drives the generator is generate
electricity and does not drive the clutch rotating shaft component to rotate. When the door needs to be opened, the outer door
handle drives the input shaft to rotate, drives the generator to generate
electricity and drives the clutch rotating shaft component to rotate.