The effect of dissipative loss in the grating surface on a Smith–Purcell free-electron laser is investigated with the help of a two-dimensional particle-in-cell simulation. The simulation model supposes an open grating driven by a continuous electron beam. With present parameters, simulation results show that such a device can oscillate on absolute instability, Bragg condition and convective instability when ignoring the surface loss. The growth rate is found to be dependent of beam energy, and it decreases when the surface loss is involved. It is shown that surface loss impacts a lot on the Bragg region. Comparisons of simulation results with the latest theory are reported.