In this study, a novel Ag/β-Bi2O3/Bi2O2CO3 nanocomposite was prepared by in-situ decomposition of a three-dimensional bismuth-trimesic acid complex (Bi–BTC) precursor at 300 ℃. The multilayered morphology and heterojunction structure of the prepared Ag/β-Bi2O3/Bi2O2CO3 nanocomposite were characterized by a series of technologies. The photocatalytic performance of Ag/β-Bi2O3/Bi2O2CO3 was evaluated by removal of sulfadiazine (SD) antibiotic from water under visible-light irradiation, and the degradation efficiency of SD was up to 96.8 % within 160 min. The superior catalytic activity of Ag/β-Bi2O3/Bi2O2CO3 is attributed to the p-n heterojunction structure constructed by β-Bi2O3 and Bi2O2CO3, as well as the surface plasmon resonance effect of nano-silver, which not only promoting the charge separation and transfer, but also increasing the hot electron density. Electron paramagnetic resonance (EPR) and active species trapping experiments indicated that ∙O2 and h+ play a major role in the oxidative degradation of sulfadiazine. The possible degradation pathway of sulfadiazine was identified, and the ecological toxicity of SD and its degradation intermediates was estimated using T.E.S.T. software. In addition, the as-prepared Ag/β-Bi2O3/Bi2O2CO3 showed excellent photo-corrosion resistance capacity and good reusability in photocatalytic degradation of SD.