The simultaneous detection of multiple analytes through a single fluorescence sensor is highly attractive. In this study, phosphorus-doped graphitic carbon nitride quantum dots (P-CNQDs) were developed, achieving multi-mode sensing through three distinct response mechanisms. The preparation involved using melamine as the carbon and nitrogen source and ammonium dihydrogen phosphate as the phosphorus source. Uniform and narrowly distributed P-CNQDs were successfully synthesized through chemical oxidation and hydrothermal methods, with an average size of 2.4 nm. These unique P-CNQDs exhibited fluorescence quenching through photo-induced electron transfer (PET) in response to Ag+. Additionally, the formation of hydrogen bonds and coordination interactions between P-CNQDs-Ag+ and ciprofloxacin (CIP) led to a pronounced fluorescence response to CIP by the chelation enhanced fluorescence (CHEF) mechanism. Furthermore, leveraging the principle of fluorescence resonance energy transfer (FRET), P-CNQDs-CIP served as a ratio fluorescence sensor for riboflavin (RF), enabling ultra-sensitive detection of RF. The combination of PET, CHEF, and FRET response mechanisms successfully facilitated multi-mode sensing for Ag+, CIP, and RF. The detection ranges were 0.05–100 μM, 0.002–2 μM, and 0.05–60 μM, with corresponding lowest detection limits of 17.1 nM, 1.1 nM, and 29.2 nM, respectively. This versatile sensor has been effectively applied to real samples, including the detection of river water and vitamin B2 tablets.