The invention discloses a method for manufacturing a variable-pitch optical grating and relates to the technical field of spectrums. The method for manufacturing the variable-pitch optical grating solves the problems that according to an existing method adopting hot melting, the technological conditions are hard to control, collapse of a photoresist etching groove is caused easily, and the technical indexes of an optical grating are affected seriously. The method for manufacturing the variable-pitch optical grating comprises the steps of washing of a substrate, photoresist evening, prebaking, exposure, developing, postbaking, ion beam etching, cleaning and film coating. According to the technological process for manufacturing the variable-pitch optical grating, cost is low, the method is easy to implement, cost is reduced greatly, and the manufacturing cycle is shortened. Due to the fact that the variable-pitch optical grating has the increasingly outstanding unique advantages of aberration correction, high resolution and flat focus field, the variable-pitch optical grating is widely applied in the fields such as the spatial spectrograph field, the plasma diagnosis field, the synchrotron radiation monochrometer field and the optical fiber communication field.