Two-dimensional donor−acceptor covalent organic frameworks (COFs) show considerable promise for metal-free and heterogeneous photocatalysis due to their efficient charge carrier separation and exciton transport upon photoexcitation. To date, numerous photocatalysts have been developed. However, they encounter several challenges, such as inadequate sunlight harvesting ability, poor photostability, and nonreusability. Fortunately, the emergence of COFs presents a promising solution to these problems. Herein, we report an imine-linked CzTA−TAPT COF featuring carbazole as the electron donor and triazine as the electron acceptor. Compared to the previously reported C2-linkerderived CzDA−TAPT COF, this C3-linked COF exhibits good charge separation and charge carrier transport. As a consequence, it demonstrates excellent photocatalytic applicability in the C-3 thiocyanation of imidazo[1,2-a]pyridine and indole under ambient conditions under visible light. Moreover, its broad substrate compatibility and high recyclability provide a green and sustainable approach for the thiocyanation of imidazopyridine and indole. To the best of our knowledge, this is the first heterogeneous catalyst demonstrated for the thiocyanation of imidazo[1,2-a]pyridine. These findings will inspire further research in the development of high-performance D−A COFs as photocatalysts for organic transformations.