The invention relates to the field of optical manufacturing technology, in particular to a continuous zoom lens with a linear motor and a self-locking function, including a moving lens, a scale, a reading head, a control circuit, a slider, a slide rail, a linear motor and a self-locking lens. Lock structure, the linear motor includes a stator and a mover, the stator includes a first magnet fixing plate and a second magnet fixing plate, the first magnet fixing plate and the second magnet fixing are provided with a magnet array, the first magnet fixing plate and the second magnet fixing There is a gap between the plates, one side of the stator is provided with an opening, and one side of the mover protrudes from the opening; the self-locking structure includes a locking motor, a rotating shaft, a magnet and a locking block, and the two sides of the locking block are arranged in parallel There is a magnetic guide sheet, and the rotating shaft is provided with a magnet. The invention adopts a scale and a reading head, reads the position information of the scale, and then obtains the position information of the moving lens, and the control circuit controls the running state of the linear motor according to the position information, thereby realizing closed-loop control of the up and down movement of the moving lens.