The invention discloses a bookbinding machine with an improved locking mechanism. The bookbinding machine with the improved locking mechanism is characterized in that an unlocking rod is arranged on a rack, a drilling mechanism is provided with a trigger mechanism, the lower end of the unlocking rod abuts against a locking block, a trigger part for unlocking an upper pressing head and making the upper pressing head reset upwards is arranged on the unlocking rod, and after pressing rivet operation is finished, in the resetting process of the drilling mechanism, the trigger mechanism of the drilling mechanism triggers the trigger part, the unlocking rod drives the locking block to release the locking rod, and therefore the locking state of the locking block is relieved and the upper pressing head resets. The bookbinding machine is simple in structure, ingenious in design, few in parts, low in cost, stable and reliable in motion, and free of incorrect operation, automatic locking, automatic unlocking and automatic resetting of the upper pressing head are achieved, the bookbinding machine does not need to be driven by an independent motor, a complex linkage mechanism is not needed, and users do not need to manually operate the bookbinding machine.