Thermal evolution models suggest that the luminosities of both Uranus and Neptune are inconsistent with the classical assumption of an adiabatic interior. Such models commonly predict Uranus to be brighter and, recently, Neptune to be fainter than observed. In this work, we investigate the influence of a thermally conductive boundary layer on the evolution of Uranus- and Neptune-like planets. This thermal boundary layer (TBL) is assumed to be located deep in the planet and be caused by a steep compositional gradient between a H–He-dominated outer envelope and an ice-rich inner envelope. We investigate the effect of TBL thickness, thermal conductivity, and the time of TBL formation on the planet’s cooling behaviour. The calculations were performed with our recently developed tool based on the Henyey method for stellar evolution. We make use of state-of-the-art equations of state for hydrogen, helium, and water, as well as of thermal conductivity data for water calculated via ab initio methods. We find that even a thin conductive layer of a few kilometres has a significant influence on the planetary cooling. In our models, Uranus’ measured luminosity can only be reproduced if the planet has been near equilibrium with the solar incident flux for an extended period of time. For Neptune, we find a range of solutions with a near constant effective temperature at layer thicknesses of 15 km or larger, similar to Uranus. In addition, we find solutions for thin TBLs of a few km and strongly enhanced thermal conductivity. A ~ 1 Gyr later onset of the TBL reduces the present ΔT by an order of magnitude to only several 100 K. Our models suggest that a TBL can significantly influence the present planetary luminosity in both directions, making it appear either brighter or fainter than the adiabatic case.