A non-enzymatic fluorometric assay is described for the determination of glucose. The method is based on the use of g-C3N4 quantum dots (QDs) that have good water solubility. The QDs were synthesized by a one-step solvothermal process using formamide as precursor. The QDs possess an average size of 5 nm, a band gap of 3.03.5 eV, and strong blue fluorescence (with excitation/emission maxima at 400/447 nm). Fluorescence is quenched by glucose (which acts as the electron acceptor) via an electron transfer mechanism. Comprehensive spectroscopy and density functional theory calculations show that the selectivity of the fluorescent probe can be attributed to the presence of N-H bonds that are formed between the QDs (mainly at plane edges) and glucose. The interaction forces lead to the formation of localized states for capturing hot electrons. This results in a decrease in the band gap and a reduction in fluorescence intensity. The probe is selective over some typical interfering species (such as cysteine and albumin) which often are present in the urine of diabetics. The method has a linear response in the 0.2 to 5.0 mM glucose concentration range and a 0.2 mM detection limit.