Graphene quantum dots (GQDs) have been extensively used in biosensors and bioimaging. Heteroatom-doped GQDs can regulate material properties and endow them to improve structural and physicochemical properties. In this work, N,S-GQDs were prepared through a high-temperature pyrolysis method using L-cysteine and citric acid as the precursors. The morphology and structure of nanocomposites were identified by TEM, X-ray diffractometer (XRD), X-ray photoelectron spectrometer (XPS), and FTIR. The as-prepared N,S-GQDs show bright blue fluorescence with satisfactory fluorescence quantum yield. N,S-GQDs display significant response to riboflavin, achieving a low detection limit of 27[Formula: see text]nM. The reaction of N,S-GQDs to riboflavin is mainly governed by static quenching. The detection of riboflavin in real samples has been performed to demonstrate its practical application. The obtained N,S-GQDs have low cytotoxicity and have been applied successfully in cell imaging.