In this research, a BiOI/C3N5 heterostructure was synthesized using a solvothermal technique to prevent the recombination of photoexcited electrons and holes. The morphology, structure, and mechanism of the material were investigated using x-ray diffraction (XRD), scanning electron microscopy (SEM), transmission electron microscopy (TEM), high-resolution TEM (HRTEM), x-ray photoelectron spectroscopy (XPS), ultraviolet-visible diffuse reflectance spectroscopy (UV-Vis DRS), energy-dispersive x-ray spectroscopy (EDS), electron paramagnetic resonance (EPR), and photoluminescence (PL) spectroscopy, among other tests. The photocatalytic performance of the heterostructure was evaluated through the degradation of tetracycline hydrochloride (TCH). Results showed that compared to C3N5 and BiOI alone, the formation of the heterostructure significantly enhanced the photocatalytic efficiency, achieving 1.5 times the degradation efficiency of pure C3N5 and twice that of BiOI. Under optimal conditions, the composite material degraded nearly 90% of TCH within 180 min, and after five cycles, it still exhibited degradation efficiency of 76.19%, demonstrating its good recyclability and stability. The main active species involved in the photocatalytic degradation of TCH were found to be superoxide radicals (center dot O-2(-)) and holes (h(+)). This work not only provides a new approach to the design of photocatalytic degradation materials but also offers a novel method for effectively degrading organic pollutants.