In this study, a novel green adsorbent based on magnetic graphene quantum dots modified with a molecularly imprinted polymer (MGQDs@MIP) was developed for the selective detection of quercetin in complex real samples. This composite material was synthesized using an environmentally friendly approach consistent with the principles of green analytical chemistry. Quercetin, an important bioactive flavonoid, was used as a template molecule to create highly selective binding sites within the MIP structure. The resulting MGQDs@MIP exhibited excellent selectivity, sensitivity and reusability and was effectively used for the extraction and quantification of quercetin in black tea, coffee, oregano and cinnamon using a simple spectrophotometric method. The adsorbent showed a wide linear detection range (0.01–3.00 μg mL−¹; R2 = 0.9999, n = 7; regression equation: y = 0.2587 − 0.0005), a low detection limit (4.88 ng mL−¹) and high recoveries (96.97–102.97%). This work demonstrates the potential of MGQDs@MIP as a cost-effective, sustainable and efficient platform for flavonoid analysis in real samples.