As we all know, SERS (Surface-enhanced Raman spectroscopy) is widely used in sensing, analysis and detection. The covalent organic frameworks (COFs) have performed well as a material for supporting metal nanoparticles and facilitating analyte adsorption in SERS, which may greatly enhance the detection sensitivity and reproducibility. The synthesis of traditional metal/COFs composites involved chemical reduction methods, however, the resulting metallic NPs exhibited reduced capacity to enhance SERS due to their small particle sizes (usually <20 nm). This paper presented a novel photoreduction method for the facile growth of AuNPs (diameters: 75 nm) on COFs matrix under light control, which represents the first report of such synthesis on COF. Subsequently, the photoreduction deposition induced AuNPs/COFs composites, which served as highly sensitive and reproducible SERS-active substrates for capturing the spectral information of four types of macrolide antibiotics. The detection limits for the four macrolide antibiotics were determined to be 3.30 × 10