In this study, an organic semiconductor molecule of 2-(2,6-bis((E)-2-(5-(9H-carbazol-9-yl)thiophen-2-yl)vinyl)-4H-pyran-4ylidene)malononitrile (CZ-DCM) with hyperconjugated "D-π-A-π-D" electron distribution, near-infrared emission, and a large Stokes shift of 190 nm was successfully prepared by the Knoevenagel reaction of 2-(2,6-dimethyl-4H-pyran-4-ylidene)malononitrile with 5-(9H-carbazol-9yl)thiophene-2-carbaldehyde. Electrochemical impedance spectroscopy (EIS) and transient photocurrent measurements demonstrated the semiconducting behavior of CZ-DCM. Subsequently, the Friedel−Crafts reaction of CZ-DCM with octavinylsilsesquioxane (OVS) was carried out to prepare a novel hybrid network (PCS-CZ-DCM) with a high surface area of 954 m 2 g −1 and a large pore volume of 0.96 cm 3 g −1 , which also showed semiconducting behavior. PCS-CZ-DCM exhibited a regulatable near-IR-luminescence sensitivity to berberine chloride hydrate (BCH), which was not influenced by other antibiotics. It displayed a good pH stability ranging from 2 to 11, and the fluorescence quenching constant K SV was 2.1 × 10 4 M −1 . Moreover, PCS-CZ-DCM exhibited excellent photodegradation activity for antibiotics without additional oxidation agents or pH adjustments. PCS-CZ-DCM was highly stable and can be easily regenerated. After seven cycles, the removal rate was still maintained as high as 85%. Thus, we realized concurrent detection and degradation of BCH. ESR analysis proved that the superoxide radical (•O 2 − ) had a significant impact on the photocatalytic system of PCS-CZ-DCM. The outstanding results using PCS-CZ-DCM demonstrated its potential for the control of antibiotic pollutants in environmental applications.