  In classical thermodynamics, heat must spontaneously flow from hot to cold
systems. In quantum thermodynamics, the same law applies when considering
multipartite product thermal states evolving unitarily. If initial correlations
are present, anomalous heat flow can happen, temporarily making cold thermal
states colder and hot thermal states hotter. Such effect can happen due to
entanglement, but also because of classical randomness, hence lacking a direct
connection with nonclassicality. In this work, we introduce scenarios where
anomalous heat flow \emph{does} have a direct link to nonclassicality, defined
to be the failure of noncontextual models to explain experimental data. We
start by extending known noncontextuality inequalities to a setup where
sequential transformations are considered. We then show a class of quantum
prepare-transform-measure protocols, characterized by time intervals
$(0,\tau_c)$ for a given critical time $\tau_c$, where anomalous heat flow
happens only if a noncontextuality inequality is violated. We also analyze a
recent experiment from Micadei et. al. [Nat. Commun. 10, 2456 (2019)] and find
the critical time $\tau_c$ based on their experimental parameters. We conclude
by investigating heat flow in the evolution of two qutrit systems, showing that
our findings are not an artifact of using two-qubit systems.
