Herein, a stable and ultra-sensitive rutin electrochemical sensor was successfully developed. This sensor based on glassy carbon electrode (GCE) modified with C-GCS@ZIF-F/PL nanocomposite, which was made of thermally carbonized glucose (GCS) doped with flower-like ZIF (ZIF-F) and pencil lead (PL). The electrochemical response of rutin was considerably significant at C-GCS@ZIF-F/PL/GCE, demonstrating favorable conductivity and electrocatalytic properties for detection of rutin. Under optimal conditions, the detection limits of 0.0054 μM and 0.11 μM were obtained in linear ranges of 0.1–10 μM and 10–100 μM, respectively. It also exhibits excellent stability, reproducibility, as well as selectivity over common interfering ions such as Na+, uric acid, quercetin and riboflavin, etc. Meanwhile, the practical utility of developed sensor was evaluated in food samples including honey, orange, and buckwheat tea, achieving satisfactory recovery rates ranging from 98.2% to 101.7%. This paper introduces a novel technique for the detection of rutin in foods.