A novel phenanthroline derivative, 4-[4-(N-methyl)styrene]-imidazo[4,5-f][1,10]phenanthroline-benzene iodated salt (MSIPBI), was synthesized, and the linear absorption and fluorescent spectra of MSIPBI in different solvents were investigated. The photophysical properties in unbound and in ligand–metal complexes were evaluated by UV absorption and one- and two-photon fluorescent spectra, and the quantum yields, two-photon active cross-sections and the binding constant of dye–metal were calculated. The results indicated that MSIPBI has a large Stokes shift (more than 167nm), and the dye was selective and sensitive for the detection of Hg2+ with a two-photon active cross-section of 55.5GM in tris–HCl buffer solution at 800nm. Furthermore, the results of the fluorescence microscopy imaging indicated that MSIPBI is an efficient fluorescent probe for the detection of Hg2+ in living cells by one- and two-photon excitation. Moreover, the experiments of determination Hg2+ in river water and tap water were finished.