This research explores fluorescent covalent organic polymer (COP) as light-emitting materials due to their porous nature and π-conjugated skeleton. We successfully synthesized a fluorescent COP, named Pery-DHTP-BZ-COP, using the Sonogashira−Hagihara coupling reaction. This reaction combines 3,8-bis(4ethynylphenyl)-2, 3,4,7,8,9-hexahydrobenzo[1,2-e:4,5-e′]bis([1,3]oxazine) (DHTP-BZ) with 1,7-dibromoperylene dianhydride (Pery-Br 2 ). We confirmed the existence of the benzoxazine (BZ) ring and the overall structure of Pery-DHTP-BZ-COP using FTIR and NMR spectroscopy. The FTIR, DSC, and TGA analyses were employed to investigate the thermal ring-opening polymerization (ROP) behavior and thermal stability of Pery-DHTP-BZ-COP at various temperatures. Photoluminescence (PL) spectroscopy and ultraviolet (UV) light were used to demonstrate the fluorescence emission properties of Pery-DHTP-BZ-COP dispersed in a solution. These fluorescent properties, combined with the electron-rich nature of the COP, led us to develop a sensor for selective and accurate detection of lead ions (Pb 2+ ) and a nitroaromatic explosive, trinitrophenol (TNP). The electron-rich nature of Pery-DHTP-BZ-COP facilitates efficient electron transfer to the target analytes (Pb 2+ and TNP). This electron transfer process results in the fluorescence quenching of the COP, allowing for detection. The sensor exhibits a desirable linear response to both Pb 2+ and TNP with remarkably low detection limits of 0.5 μM (0.163 ppm) and 0.7 μM (0.16 ppm), respectively.