Provided in the present utility model is a self-
locking mechanism of a lock, the lock comprising a lock housing, a lock cylinder and an insert pin, the insert pin having a snap-fit position, the lock housing having a space into which the insert pin is inserted, an insert being provided within the lock housing, and a self-
locking mechanism being provided within the lock housing. The self-
locking mechanism comprises a snap-fit member, which is arranged in the lock housing, wherein the snap-fit member has a
normal state and a compressed state; the snap-fit member is provided with a first blocking portion extending into the range of the trajectory of movement of the insert and a second blocking portion extending into the range of the trajectory of
insertion of the insert pin; and the inside of the lock housing is provided with a first elastic member for driving the snap-fit member to switch from the compressed state to the
normal state. By providing the snap-fit member that is provided with the first blocking portion and the second blocking portion, when the insert pin is inserted into the lock housing, the first blocking portion of the snap-fit member is automatically pushed away, so as to release the limitation of the second blocking portion on the insert, such that the insert automatically engages under the action of the first elastic member, which eliminates the need to take out a key and turn the key for locking, making it more convenient to use.