Photocatalysis is a promising technology for water purification, but the inadequate separation of photogenerated charge carriers and light utilization efficiency limits its practical application. Herein, a highly solar-responds photocatalyst Bi5O7I/preoxidized nickel foam (Bi5O7I/NiO-NF) with p-n heterojunction was constructed by impregnation and microwave-assisted co-precipitation method to remove typical antibiotic efficiently. The special pretreatment is conducive to the formation of NiO on the NF surface, which participates in the construction of p-n heterogeneous structures and strengthens the bonding force between NiO-NF and surface Bi5O7I. The macroscopic renewable Bi5O7I/NiO-NF could effectively degrade sulfamerazine (SMR) nearly 100 % under sunlight irradiation and be convenient for separating from aqueous. Variety pollutants are degraded with high efficiency in the solar Bi5O7I/NiO-NF system, and the system performs the resistance to co-existing ions (≥89 % removal efficiency) and water matrix interference (≥95 % removal efficiency). Quenching experiments and electron paramagnetic resonance spectroscopy characterization results indicate that h+, 1O2 and O2− are the dominant reactive substances in SMR elimination. Based on the DFT calculation and quadrupole-time of flight-liquid chromatography/mass spectrometry (Q-TOF-LC/MS) detection, C-S and N-S bonds tend to be attacked in the SMR degradation pathway. This work opens up novel insights for constructing efficient macroscopic photocatalysts for practical water treatment.