We first synthesize a novel aldehyde-substituted benzo[1,2-d:4,5-d']bis(thiazole) monomer (BBTC) via a facile method with a high yield, and the BBTC is used for the first time as a building block for synthesis of imine-linked COFs. By using linkage transformation strategy, we further synthesize an imidazole N-heterocyclic carbene precursor COF (BBTC-INP COF) and the imidazole-2-thione COF (BBTC-IT COF). Interestingly, the BBTC-INP and BBTC-IT COFs exhibit 2620- and 1810-fold enhancements in photoluminescence quantum yields, respectively, compared to the parent BBTC COF. This linkage transformation not only optimizes the optical performance but also enables effective Hg2⁺ detection through the strategic incorporation of thione (C═S) groups as specific binding sites. In particular, the BBTC-IT COF presents outstanding selectivity and sensitivity for toxic Hg2⁺ detection, and the limit of detection reaches 60 nM, highlighting the advantage of as-synthesized BBTC-IT COFs in fluorescence sensing applications. In short, this work reports a series of novel thiazole-2-carbaldehyde-based COFs, which largely enriches the diversity of COFs and would also stimulate the synthesis of more BBTC-based COFs for different applications.