Mercury is a hazardous heavy metal that poses serious threats to human health and the environment. Hence, developing simple, rapid, cost-effective, and portable analytical methods with high sensitivity and selectivity is critical. In this study, carbon quantum dots (CQDs) were synthesized via a one-step microwave process using urea and citric acid, achieving a quantum yield of 45.03%. The CQDs were characterized by UV-Vis, PL, XRD, XPS, FTIR, and TEM techniques. They exhibited highly selective, interference-free fluorescence detection of Hg2+ ions within 7 min, even in the presence of other metal ions (Mg2+, Ca2+, Mn2+, Fe2+, Co2+, Ni2+, Cu2+, Zn2+, Cd2+, Pb2+, Al3+, Fe3+, and Na+). A linear fluorescence response was observed in the Hg2+ concentration range of 2-9 mu M (R2 = 0.99861), with a detection limit as low as 1.8 nM. The CQDs maintained stable detection performance in a pH range of 6-9. Furthermore, a simple paper-based sensor was developed for on-site mercury detection. The sensing mechanism was explored through FTIR, UV-Vis, TEM, and a novel agarose gel electrophoresis technique, which revealed the migration behavior of CQD-Hg2+ complexes at varying concentrations. This study offers a highly selective, rapid, and practical mercury detection method with enhanced LOD and provides mechanistic insights into CQD-Hg2+ interactions, using gel electrophoresis to deepen the understanding of the sensing process.