Mercury ion (Hg2+) is a highly toxic and ubiquitous pollutant, whose effective detection has aroused widespread concern. A novel ratiometric fluorescent sensor has been designed to rapidly and efficiently detect Hg2+ based on blue/red carbon dots (CDs) with environmental friendliness. This sensor was well characterized via TEM, FTIR, XPS, UV–vis, and zeta potential analysis and displayed excellent fluorescence properties and stability. The fluorescence of blue CDs at 447 nm was significantly quenched with the addition of Hg2+ resulted from the static quenching, whereas that of red CDs at 650 nm remained invariable. A sensitive method for Hg2+ determination was constructed in the range of 0.05–7.0 nmol mL−1 with optimal conditions, and the detection limit was down to 0.028 nmol mL−1. Meanwhile, compared to other 17 metal ions, the ratiometric fluorescent sensor exhibited high selectivity for Hg2+. Furthermore, satisfied recoveries had also been obtained for measuring trace Hg2+ in practical environmental samples. This developed ratiometric fluorescent sensor provided a reliable, environmental-friendly, rapid, and efficient platform for the detection of Hg2+ in environmental applications.