Selective detection of active ingredients in complex samples has always been a crucial challenge because there are many disturbing compounds, especially structural analogues that interfere with the detection. In this work, a fluorescent covalent organic framework (named COF-TD), which can be used for the selective fluorescence detection and enrichment of myricetin from complex samples, was reported for the first time. The highly crystalline COF-TD with bright blue fluorescence was formed through a solution polymerization method by the condensation reaction between 4,4',4″-(1,3,5-triazine-2,4,6-triyl)trianiline and 2,5-dihydroxy-1,4-benzenedicarboxaldehyde. Due to spatial size selectivity, multisites hydrogen bonding, and π-π interaction, myricetin can quench the fluorescence of COF-TD with an inner filter effect (IFE) and static quenching mechanisms as well as can be enriched on COF-TD. Myricetin can observably eliminate the interference of other compounds and selectively quench the fluorescence of COF-TD with a limit of detection (LOD) of 0.30 μg·mL-1. The high adsorption ability of COF-TD (Q = 124.6 mg·g-1) to myricetin was also obtained. Finally, a sensing platform based on COF-TD for myricetin was successfully developed and applied for the detection of myricetin from vine teas. In addition, COF-TD also showed good water sensing ability and could be used effectively to detect water content in organic solvent (1-18% water in acetone, 0.5-5% water in acetonitrile, 1-4.5% water in ethyl acetate, v/v). To the best of our knowledge, this is the first report where COF-TD was used to detect water in a relatively wide concentration range. In all, this work provided dual-functional fluorescent COFs with the properties of an adsorbent, opening up new methodologies for the simple, selective, and enrichment detection method for myricetin.