Two stable crystalline hydrazone-linked covalent organic frameworks (COFs) (Bth-Dha and Bth-Dma) containing functional O,N,O'-chelating sites have been designed and successfully synthesized by the Schiff-base condensation reactions between benzene-1,3,5-tricarbohydrazide (Bth) and 2,5-dihydroxyterephthalaldehyde (Dha) or 2,5-dimethoxyterephthal-aldehyde (Dma), respectively. Bth-Dma exhibits strong fluorescence in the solid state and in an aqueous dispersion, while no fluorescence can be observed for Bth-Dha. Interestingly, the as-synthesized Bth-Dma can be used as a turn-off fluorescence sensor for the Fe(III) ion in aqueous solution with outstanding selectivity and sensitivity. The recognition process can be attributed to the coordination interaction between Fe(III) ion and the O,N,O'-chelating sites in the pore wall of Bth-Dma COF, as verified by X-ray photoelectron spectroscopy and 1H NMR spectroscopy. To the best of our knowledge, this is the first report on the rational design of luminescent COF with predesigned O,N,O'-chelating sites as a fluorescence sensor for highly selective and sensitive metal ion detection. This work may pave the way for designing luminescent COF sensors with functional binding sites for detecting specific metal ions.