Fabrication of hydrophobic melamine sponge incorporated with carbon dots was investigated to extract triazoles prior to HPLC-DAD quantitation. The melamine sponge was simply incorporated with carbon dots via thermal treatment under facile conditions. The optimum conditions were melamine sponge (MeS) (1 × 1 × 1 cm3), 10 mL of standard solution, 0.04 M citric acid, functionalized at 250 °C for 5 h, and the analytes was then eluted from as-prepared material using acetonitrile (200 µL). Operating the best conditions, wide linearity was gained with R2 ≥ 0.99, for all analytes. Detection limits established varied between 3–10 μg L−1. Such approached method demonstrates excellent applicability for accurately and efficiently determining triazole fungicides in edible fungi samples, and a good recovery was also obtained. In addition, the desirable method validation and cost effective, not only its potential for reuse, but also provides it a better alternative for matrix purification. The appraisal estimated by two methods, confirmed its superior environmental friendliness.