The cascade of energy in turbulent flows, i.e., the transfer of kinetic energy from large to small flow scales or vice versa (backward cascade), is the cornerstone of most theories and models of turbulence since the 1940s. Yet, understanding the spatial organisation of kinetic energy transfer remains an outstanding challenge in fluid mechanics. Here, we unveil the three-dimensional structure of the energy cascade across the shear-dominated scales using numerical data of homogeneous shear turbulence. We show that the characteristic flow structure associated with the energy transfer is a vortex shaped as an inverted hairpin followed by an upright hairpin. The asymmetry between the forward and backward cascade arises from the opposite flow circulation within the hairpins, which triggers reversed patterns in the flow.