The invention relates to a device for producing a pattern in a magnetic pigment fragment-containing coating layer, which comprises two magnetic field generators, two solidified light sources, a light barrier, a baffle plate and a base material transmitter, wherein the base material transmitter comprises two wheel shafts arranged at two ends, and a feed belt which takes the two wheel shafts as shaft drive, one magnetic field generator, one solidified light source, the other magnetic field generator and the other solidified light source are sequentially arranged along with the direction from one wheel shaft to the other wheel shaft, and the surface of the feed belt is provided with a base material which is coated or printed with the magnetic pigment fragment-containing magnetic ink coating layer. The visually-changed safe pattern disclosed by the invention belongs to a first-line and second-line anti-counterfeiting synthesis technique, the true and false can be visually identified without any tools, and the magnetism of the pattern can be detected by magnetism detecting equipment as well; and the anti-counterfeiting ink which symmetrically changes by means of light and shade (color) along with the change of the visual angle is high in preparation difficulty, the effect is very hard to imitate, and the fidelity effect is extremely high.