A novel visible-light-driven AgI/BiPO4 composite was synthesized by a facile room temperature deposition–precipitation method. The structures, morphologies, components and optical properties of the obtained samples were systematically characterized using X-ray powder diffraction, scanning electron microscopy, energy dispersive X-ray spectroscopy, transmission electron microscopy, high-resolution transmission electron microscopy, X-ray photoelectron spectroscopy, UV–vis diffuse reflectance spectroscopy and Brunauer–Emmett–Teller surface area. The loading of AgI nanoparticles endowed BiPO4 with good visible light absorption and excellent visible light photocatalytic activity for degrading rhodamine B. The kapp value of AgI/BiPO4 for degrading rhodamine B was 0.044min−1, which was three times that of pure AgI. Besides, AgI/BiPO4 maintained good stability in the recycling process. The outstanding photocatalytic activity could be mainly attributed to the fast separation of electron–hole pairs, ensured by the enhanced photocurrent intensity, by using BiPO4 as a highly efficient electron trap.