A coumarin-based alkyne was developed as a fluorescent chemodosimeter for the selective detection of mercuric ion. It showed a high selectivity and sensitivity to mercury(II) ion over other metal ions in water.