Extracting gold from discarded electronic devices can alleviate the growing environmental problems associated with e-waste and provide a sustainable avenue for the secondary utilization of precious metal resources. Unfortunately, viable green recycling methods have not yet been implemented beyond the large-scale incineration of electronic circuit boards, mainly due to the lack of emerging strategies for efficient gold extraction. It is foreseeable that using green photocatalytic technology to extract gold can provide alternative to existing strategies. Herein, we explore the application of D-pi-A-type thiazole-functionalized three-dimensional (3D) conjugated microporous polymer (CMP) (BTD-TEP) for photo-enhanced gold extraction from e-waste. With a large specific surface area, abundant high-affinity sites, good chemical stability, and excellent photocatalytic activity, BTD-TEP can be used as an advanced platform for selective extraction and photocatalytic reduction of gold, thus exhibiting a breakthrough gold recovery capacity (3217.8 mg/g). In the dark, BTD-TEP can selectively extract gold through thiazole motifs integrated on the highly accessible 3D skeleton. Meanwhile, the construction of a highly conjugated 3D D-pi-A framework significantly increases the exposure of the catalytic center, enhances the photocatalytic activity of BTD-TEP, and allows for an additional gold photocatalytic reduction process under visible light, which greatly improves the recovery capacity and kinetics.