We have developed a highly sensitive, selective and reusable fluorescence sensor with photonic crystal (PC) films for mercury(II) ion detection, based on the Bragg reflection of PCs and formation of thymine-Hg(2+)-thymine (T-Hg(2+)-T) complexes. The T-rich single stranded DNA (ssDNA) labeled by a fluorophore was self-assembled on the surface of Au-sputtered PCs through Au-thiol binding, in which the DNA exists in a single stranded chain. The obtained ssDNA-functionalized PC films show a strong fluorescence emission derived from the Bragg reflection of PCs, because the fluorescence wavelength of ssDNA is in the range of the selected PC stopband. After reaction with Hg(2+) ions, the conformation of ssDNA changes from the original single stranded chain to a folded hairpin structure due to the formation of T-Hg(2+)-T complexes. This leads to a fluorescence resonance energy transfer process between the fluorophore and the thin gold film, which results in significant fluorescence quenching. The sensitivity of the fluorescence detection, with a detection limit of 4 nM, can be obviously enhanced by the Bragg reflection of PCs compared to the control sample without PC structures. The prepared sensor is negligibly responsive to other metal ions. In addition, the sensor can also be easily regenerated and reused by decoupling the T-Hg(2+)-T base pairs using cysteine. As a result, a highly sensitive, selective and reusable Hg(2+) ion sensor based on a ssDNA-functionalized PC film has been achieved, which will be of importance for the effective and practical detection of heavy metal ions.