Context. The large disparity in physical conditions from the diffuse interstellar medium (ISM) to denser clouds such as photon-dominated regions (PDRs) triggers an evolution of the dust properties (i.e. composition, size, and shape). The gas physics and chemistry are tightly connected to these dust properties and are therefore affected by dust evolution and especially the nano-grain depletion in the outer irradiated part of PDRs. Aims. We highlight the influence of nano-grain depletion on the gas physics and chemistry in the Horsehead nebula, a prototypical PDR. Methods. We used a model for atomic and molecular gas in PDRs, the Meudon PDR code, using diffuse ISM-like dust and Horsehead-like dust to study the influence of nano-grain depletion on the gas physics and chemistry, focusing on the impact on photoelectric heating and H2 formation and, therefore, on the H2 gas lines. Results. We find that nano-grain depletion in the Horsehead strongly affects gas heating through the photoelectric effect and thus the gas temperature and the H2 formation, hence the H → H2 position. Consequently, the first four pure rotational lines of H2 (e.g. 0–0 S(0), S(1), S(2), and S(3)) vary by a factor of 2 to 14. The 0–0 S(3) line that is often underestimated in models is underestimated even more when taking nano-grain depletion into account due to the decrease in gas heating through the photoelectric effect. This strongly suggests that our understanding of the excitation of H2 and/or of heating processes in the Horsehead, and more generally in PDRs, is still incomplete. Conclusions. Nano-grain depletion in the outer part of the Horsehead has a strong influence on several gas tracers that will be prominent in JWST observations of irradiated clouds. We therefore need to take this depletion into account in order to improve our understanding of the Horsehead, and more generally PDRs, and to contribute to the optimal scientific return of the mission.