The solar corona is shaped and mysteriously heated to millions of degrees by the Sun’s magnetic field. It has long been hypothesized that the heating results from a myriad of tiny magnetic energy outbursts called nanoflares, driven by the fundamental process of magnetic reconnection. Misaligned magnetic field lines can break and reconnect, producing nanoflares in avalanche-like processes. However, no direct and unique observations of such nanoflares exist to date, and the lack of a smoking gun has cast doubt on the possibility of solving the coronal heating problem. From coordinated multi-band high-resolution observations, we report on the discovery of very fast and bursty nanojets, the telltale signature of reconnection-based nanoflares resulting in coronal heating. The nanojet is uniquely characterised by being transverse to the loop and appears as a unidirectional jet from the reconnection point. Isolated and clustered nanojets are detected, and a myriad are observed in an avalanche-like progression, leading to the formation of a coronal loop. Using state-of-the-art numerical simulations, we demonstrate that the nanojet is a consequence of the slingshot effect from the magnetically tensed, curved magnetic field lines reconnecting at small angles. Nanojets are therefore the key signature of reconnection-based coronal heating in action.