Ternary PANI@Bi2O3-BiOCl nanocomposites were successfully synthesized during the oxidative polymerization of aniline monomer in the presence of Bi2O3. PANI@Bi2O3-BiOCl nanocomposites were characterized by several analytical techniques, including X-ray diffraction (XRD), Fourier Transform Infrared spectroscopy (FTIR), N2 physisorption, UV–Vis Diffuse reflectance spectroscopy (DRS), X-ray photoelectron spectroscopy (XPS), transmission electron microscopy (TEM), and scanning electron microscopy with energy dispersive spectroscopy (SEM-EDS). The effective PANI-semiconductor interaction promotes the fast separation and transfer of photogenerated electrons and holes, enhancing the photocatalytic efficiency of the materials towards methylene blue (MB) degradation under solar light irradiation. The best results were obtained by 0.5%PANI@Bi2O3-BiOCl, leading to 80% MB degradation in 2 h, four times higher than pristine Bi2O3-BiOCl. Moreover, 0.5%PANI@Bi2O3-BiOCl maintained stable photocatalytic performances for four cycles without significant activity loss. Various scavengers (isopropyl alcohol, formic acid, and benzoquinone) were used to identify the active species by trapping holes and radicals generated during the photocatalytic degradation process. Finally, a probable photocatalytic mechanism of PANI@Bi2O3-BiOCl photocatalyst was suggested.