This paper is concerned with the direct and inverse problem of scattering of a time‐harmonic wave by a Lipschitz diffraction grating of mixed type. The scattering problem is modeled by the mixed boundary value problem for the Helmholtz equation in the unbounded half‐plane domain above a periodic Lipschitz surface on which a mixed Dirichlet and impedance boundary condition is imposed. We first establish the well‐posedness of the direct problem, employing the variational method, and then extend Isakov's method to prove uniqueness in determining the Lipschitz diffraction grating profile by using point sources lying above the structure. Finally, we develop a periodic version of the linear sampling method to reconstruct the diffraction grating. In this case, the far field equation defined on the unit circle is replaced by a near field equation defined on a line above the surface, which is a linear integral equation of the first kind. Numerical results are also presented to illustrate the efficiency of the method in the case when the height of the unknown grating profile is not very large and the noise level of the near field measurements is not very high. Copyright © 2012 John Wiley & Sons, Ltd.