The invention discloses a chalcogenide fiber grating maskless preparation device and method. The device comprises a laser light source, an attenuation slice, a laser light source collimation optical system, a digital micromirror device, a beam splitter mirror, an imaging optical system, a mobile working platform, a CCD and a computer. The maskless preparation device is simple in structure and efficient, does not need an expensive mask plate, is low in cost and is high in operability; when a chalcogenide fiber grating is prepared by utilizing the device, features of the digital micromirror device can be utilized fully, and dynamic images can be generated through the digital micromirror device; compared with a conventional method, the preparation method is simpler; a conventional mask plate is replaced, thereby preventing the defect that the mask plate cannot be in repetitive cycle use, and saving resources; the preparation device is flexible to operate; writing period of the fiber grating is controllable; and finally, high-efficiency and maskless writing of the chalcogenide fiber grating is realized, and uniform-structure or non-uniform-structure fiber grating is obtained. The device and method have better practical value and application prospect.