The invention discloses a method for realizing guided-mode resonance filtering through a single gradient-material grating structure, and belongs to the field of an optical communication and MOEM (micro optical electro mechanical) system. The method is characterized in that an optical thin film, the refractive index of which increases progressively with the thickness, is prepared on a substrate, and by etching the refractive-index-gradient thin film, a guided-mode resonant grating structure is obtained, and furthermore, guided-mode resonance filtering can be realized; on the basis of the above, by selecting different etching depths, channel position of a filter can be adjusted; and with the etching depth being kept unchanged, by reducing gradient coefficient, multichannel filtering can be realized. The filtering performance of the guided-mode resonant grating structure is highly insensitive to change of substrate refractive index, so that even if the substrate refractive index is higher than the maximum value of the refractive index of the gradient thin film, the guided-mode resonance filtering performance keeps excellent; and the method breaks away from the limit that refractive index of a waveguide layer in a conventional guided-mode resonance filter needs to be higher than the substrate refractive index, and is more advantageous in practical application.