Heat transfer affects the performance and phasing of internal combustion engines. Correlations and equilibrium wall-function models are typically employed in engine simulations to predict heat transfer. However, many studies have shown that significant errors are expected, owing to the failure of fundamental assumptions in deriving equilibrium wall-function models. Non-equilibrium wall models provide a more accurate way of describing the near-wall region of in-cylinder flows. In this study, simultaneous high-speed high-resolution particle image velocimetry and heat-flux measurements are conducted in an optically accessible engine. The experiments are performed under both motored and fired conditions at two different engine speeds. The experimental data are utilized to assess the performance of different models in predicting the thermoviscous boundary layer. These models include commonly used heat transfer correlations, equilibrium and modified wall-function models, and a recently developed non-equilibrium wall model. It is found that the equilibrium wall-function model significantly underpredicts the heat flux under both motored and fired conditions. By considering heat release effects in the boundary layer, the non-equilibrium wall model is shown to be able to adequately capture the structure and dynamics of both momentum and thermal boundary layers in comparison with experimental measurements, demonstrating its improved performance over previously employed correlation functions and the equilibrium model.