Nanoscale distance-dependent phenomena, such as Förster resonance energy transfer, are important interactions for use in sensing and imaging, but their versatility for bioimaging can be limited by undesirable photon interactions with the surrounding biological matrix, especially in in vivo systems1,2,3,4. Here, we report a new type of magnetism-based nanoscale distance-dependent phenomenon that can quantitatively and reversibly sense and image intra-/intermolecular interactions of biologically important targets. We introduce distance-dependent magnetic resonance tuning (MRET), which occurs between a paramagnetic ‘enhancer’ and a superparamagnetic ‘quencher’, where the T1 magnetic resonance imaging (MRI) signal is tuned ON or OFF depending on the separation distance between the quencher and the enhancer. With MRET, we demonstrate the principle of an MRI-based ruler for nanometre-scale distance measurement and the successful detection of both molecular interactions (for example, cleavage, binding, folding and unfolding) and biological targets in in vitro and in vivo systems. MRET can serve as a novel sensing principle to augment the exploration of a wide range of biological systems.