Context. ESPRESSO guaranteed time observations (GTOs) at the 8.2m VLT telescope were performed to look for Earth-like exoplanets in the habitable zone of nearby stars. Barnard’s star is a primary target within the ESPRESSO GTO as it is the second closest neighbour to our Sun after the α Centauri stellar system. Aims. We present here a large set of 156 ESPRESSO observations of Barnard’s star carried out over four years with the goal of exploring periods of shorter than 50 days, thus including the habitable zone (HZ). Methods. Our analysis of ESPRESSO data using Gaussian process (GP) to model stellar activity suggests a long-term activity cycle at 3200 d and confirms stellar activity due to rotation at 140 d as the dominant source of radial velocity (RV) variations. These results are in agreement with findings based on publicly available HARPS, HARPS-N, and CARMENES data. ESPRESSO RVs do not support the existence of the previously reported candidate planet at 233 d. Results. After subtracting the GP model, ESPRESSO RVs reveal several short-period candidate planet signals at periods of 3.15 d, 4.12 d, 2.34 d, and 6.74 d. We confirm the 3.15 d signal as a sub-Earth mass planet, with a semi-amplitude of 55 ± 7 cm s−1, leading to a planet minimum mass mp sin i of 0.37 ± 0.05 M⊕, which is about three times the mass of Mars. ESPRESSO RVs suggest the possible existence of a candidate system with four sub-Earth mass planets in circular orbits with semi-amplitudes from 20 to 47 cm s−1, thus corresponding to minimum masses in the range of 0.17–0.32 M⊕. Conclusions. The sub-Earth mass planet at 3.1533 ± 0.0006 d is in a close-to circular orbit with a semi-major axis of 0.0229 ± 0.0003 AU, thus located inwards from the HZ of Barnard’s star, with an equilibrium temperature of 400 K. Additional ESPRESSO observations would be required to confirm that the other three candidate signals originate from a compact short-period planet system orbiting Barnard’s star inwards from its HZ.