Direct numerical simulations are performed to investigate the transient upstream propagation (flashback) of premixed hydrogen–air flames in the boundary layer of a fully developed turbulent channel flow. Results show that the well-known near-wall velocity fluctuations pattern found in turbulent boundary layers triggers wrinkling of the initially flat flame sheet as it starts propagating against the main flow direction, and that the structure of the characteristic streaks of the turbulent boundary layer ultimately has an important impact on the resulting flame shape and on its propagation mechanism. It is observed that the leading edges of the upstream-propagating premixed flame are always located in the near-wall region of the channel and assume the shape of several smooth, curved bulges propagating upstream side by side in the spanwise direction and convex towards the reactant side of the flame. These leading-edge flame bulges are separated by thin regions of spiky flame cusps pointing towards the product side at the trailing edges of the flame. Analysis of the instantaneous velocity fields clearly reveals the existence, on the reactant side of the flame sheet, of backflow pockets that extend well above the wall-quenching distance. There is a strong correspondence between each of the backflow pockets and a leading edge convex flame bulge. Likewise, high-speed streaks of fast flowing fluid are found to be always colocated with the spiky flame cusps pointing towards the product side of the flame. It is suggested that the origin of the formation of the backflow pockets, along with the subsequent mutual feedback mechanism, is due to the interaction of the approaching streaky turbulent flow pattern with the Darrieus–Landau hydrodynamic instability and pressure fluctuations triggered by the flame sheet. Moreover, the presence of the backflow pockets, coupled with the associated hydrodynamic instability and pressure–flow field interaction, greatly facilitate flame propagation in turbulent boundary layers and ultimately results in high flashback velocities that increase proportionately with pressure.