The present invention provides a locking mechanism, comprising a screw, and a fastening component, a top block, a first upper sliding block, a lower sliding block, a second upper sliding block, a screw block and a nut which are successively arranged on the screw in a penetrated way and cooperate with each other; wherein two ends of first upper sliding block and the second upper sliding block are both wedge-shaped surfaces with the angle of alpha, the end portion of the top block adjacent to the first upper sliding block, two ends of the lower sliding block, and the end portion of the screw block adjacent to the second upper sliding block are all wedge grooves having the angle of alpha, the wedge grooves are matched with the wedge-shaped surfaces; and the alpha is an acute angle. The locking mechanism of the present invention has the beneficial effects of simple structure, smooth cooperation of all portions, convenient use, assembling and disassembling, capacity of preventing overturn of a wedge block, having a self-aligning function, and excellent locking effect.