The invention discloses a rotating cantilever type 3D printer with the one-key locking function. The rotating cantilever type 3D printer comprises a case, a worktable, a spraying head, a locking blockand a hopper; the top of the spraying head is inserted in a sliding block, hanging rods are arranged at the left end and the right end of the sliding block, a driven wheel is arranged on the tops ofthe two hanging rods, a driving wheel is arranged on the left side of the driven wheel and is in engaged connection with the driven wheel, a second motor is arranged at the bottom of the driving wheel, the hopper is arranged on the top of the inner side of the case, the locking block is arranged at the right end of the driven wheel, the right end of the locking block is provided with a push blockand is fixedly connected with the push block, an electromagnet is arranged on the right side of the push block and is connected with the push block through a spring, and the worktable is arranged on the bottom of the inner side of the case. Structural design is simple and reasonable, practicability is high, compared with a common cantilever type 3D printer, the printing effect is better and more stable, a clamping block is arranged in the printer, opening and closing of the clamping block are controlled through control over opening or closing of the electromagnet, and use and operation are rapid and convenient.