We propose a scheme for realizing electromagnetically induced grating via the giant Kerr nonlinearity in a coherently driven four-level system with spontaneously generated coherence. In the presence of spontaneously generated coherence, Kerr nonlinearity can be enhanced with vanishing linear absorption. Thus, with a standing-wave coupling field, one can achieve a pure absorption grating, which leads the probe field to gather the zero-order direction when the detuning of the coupling field is on resonance. Moreover, we can obtain a pure phase grating, which diffracts a weak probe light into the first-order direction and the second-order direction when the detuning of the coupling field is off resonance.