The erasure of a bit of information is an irreversible operation whose minimal entropy production of kB ln 2 is set by the Landauer limit1. This limit has been verified in a variety of classical systems, including particles in traps2,3 and nanomagnets4. Here, we extend it to the quantum realm by using a crystal of molecular nanomagnets as a quantum spin memory and showing that its erasure is still governed by the Landauer principle. In contrast to classical systems, maximal energy efficiency is achieved while preserving fast operation owing to its high-speed spin dynamics. The performance of our spin register in terms of energy-time cost is orders of magnitude better than existing memory devices to date. The result shows that thermodynamics sets a limit on the energy cost of certain quantum operations and illustrates a way to enhance classical computations by using a quantum system.