Naphthalimide-rhodamine compound (NR) is developed as a ratiometric fluorescent probe for ATP detection based on the FRET mechanism. It shows an unexpected high selectivity for ATP over other anions, especially organic phosphate anions, due to simultaneous interactions of two recognition sites, which benefits fluorescence imaging in living cells.