Context. M 87 is a giant elliptical galaxy located in the centre of the Virgo cluster, which harbours a supermassive black hole of mass 6.4 × 10 9 M , whose activity is responsible for the extended (80 kpc) radio lobes that surround the galaxy. The energy generated by matter falling onto the central black hole is ejected and transferred to the intra-cluster medium via a relativistic jet and morphologically complex systems of buoyant bubbles, which rise towards the edges of the extended halo. Aims. To place constraints on past activity cycles of the active nucleus, images of M 87 were produced at low radio frequencies never explored before at these high spatial resolution and dynamic range. To disentangle different synchrotron models and place constraints on source magnetic field, age and energetics, we also performed a detailed spectral analysis of M 87 extended radio-halo. Methods. We present the first observations made with the new Low-Frequency Array (LOFAR) of M 87 at frequencies down to 20 MHz. Three observations were conducted, at 15−30 MHz, 30−77 MHz and 116−162 MHz. We used these observations together with archival data to produce a low-frequency spectral index map and to perform a spectral analysis in the wide frequency range 30 MHz-10 GHz. Results. We do not find any sign of new extended emissions; on the contrary the source appears well confined by the high pressure of the intracluster medium. A continuous injection of relativistic electrons is the model that best fits our data, and provides a scenario in which the lobes are still supplied by fresh relativistic particles from the active galactic nuclei. We suggest that the discrepancy between the low-frequency radiospectral slope in the core and in the halo implies a strong adiabatic expansion of the plasma as soon as it leaves the core area. The extended halo has an equipartition magnetic field strength of 10 μG, which increases to 13 μG in the zones where the particle flows are more active. The continuous injection model for synchrotron ageing provides an age for the halo of 40 Myr, which in turn provides a jet kinetic power of 6−10 × 10 44 erg s −1 .