Molecular beacons (MBs) are fluorescent nucleic acid probes with a hairpin-shaped structure in which the 5' and 3' ends are self-complementary. Due to a change in their emissive properties upon recognition with complementary sequences, MBs allow the diagnosis of single-stranded DNA or RNA with high mismatch discrimination, in vitro and in vivo. Whereas the stems of MB hairpins usually rely on the formation of a Watson-Crick duplex, we demonstrate in this report that the preceding structure can be replaced by a G-quadruplex motif (G4). Intramolecular quadruplexes may still be formed with a central loop composed of 12 to 21 bases, therefore extending the sequence repertoire of quadruplex formation. G4-MB can efficiently be used for oligonucleotide discrimination: in the presence of a complementary sequence, the central loop hybridizes and forms a duplex that causes opening of the quadruplex stem. The corresponding G4-MB unfolding can be detected by a change in its fluorescence emission. We discuss the thermodynamic and kinetic opportunities that are provided by using G4-MB instead of traditional MB. In particular, the intrinsic feature of the quadruplex motif facilitates the design of functional molecular beacons by independently varying the concentration of monovalent or divalent cations in the medium.