We present a new class of DNA-based nanoswitches that, upon enzymatic repair, could undergo a conformational change mechanism leading to a change in fluorescent signal. Such folding-upon-repair DNA nanoswitches are synthetic DNA sequences containing O6 -methyl-guanine (O6 -MeG) nucleobases and labelled with a fluorophore/quencher optical pair. The nanoswitches are rationally designed so that only upon enzymatic demethylation of the O6 -MeG nucleobases they can form stable intramolecular Hoogsteen interactions and fold into an optically active triplex DNA structure. We have first characterized the folding mechanism induced by the enzymatic repair activity through fluorescent experiments and Molecular Dynamics simulations. We then demonstrated that the folding-upon-repair DNA nanoswitches are suitable and specific substrates for different methyltransferase enzymes including the human homologue (hMGMT) and they allow the screening of novel potential methyltransferase inhibitors.