8,8'-(1,4,10,13-Tetrathia-7,16-diazacyclooctadecane-7,16-diyl)-bis(methylene)diquinolin-7-ol (TTBQ) was synthesized and proved to selectively recognize Hg(2+), forming a Hg(2+)/TTBQ complex with an association constant (K(a)) as large as approximately 1.3 x 10(4) +/- 520 M(-1) in aqueous solution. Single crystals of TTBQ and a TTBQ-Hg(2+) complex have also been successfully grown, in which the latter unambiguously revealed a cagelike configuration consisting of thiol-crown and dual 7-hydroxyquinoline moieties to firmly trap Hg(2+). This 3D-complexation structure accounts for approximately 25-fold luminescence enhancement and a detection limit of sub-microM in water for sensing Hg(2+). Great selectivity toward Hg(2+) has been exhibited over alkali- and alkaline-earth metal ions, first-row transition-metal ions, and other cations studied. This chemosensor is particularly suited for the detection of Hg(2+) in a pH range of 5.5 to 7.5. This, in combination with its fine biocompatibility, leads to the success toward in vitro mercury recognition based on fluorescence imaging.