We theoretically investigate the phenomena of electromagnetically induced grating in an M-type five-level atomic system. It is found that a weak field can be effectively diffracted into high-order directions using a standing wave coupling field, and different depths of the phase modulation can disperse the diffraction light into different orders. When the phase modulation depth is approximated to the orders of , and , the first-, second- and third-order diffraction intensity reach the maximum, respectively. Thus we can take advantage of the phase modulation to control the probe light dispersing into the required high orders.