Atmospheric ozone plays an important role on the temperature structure of the atmosphere. However, it has not been included in previous studies on the effect of an increasing solar radiation on the Earth's climate. Here we study the climate sensitivity to the presence/absence of ozone with an increasing solar forcing for the first time with a global climate model. We show that the warming effect of ozone increases both the humidity of the lower atmosphere and the surface temperature. Under the same solar irradiance, the mean surface temperature is 7 K higher than in an analogue planet without ozone. Therefore, the moist greenhouse threshold, the state at which water vapor becomes abundant in the stratosphere, is reached at a lower solar irradiance (1572 W/m2 with respect to 1647 W/m2 in the case without ozone). Our results imply that ozone reduces the maximum solar irradiance at which Earth-like planets would remain habitable.