Cerium dioxide (CeO2, ceria), a promising and abundant catalytic material with high-efficiency, nontoxicity, photochemical stability, and affordability, can be used as a photocatalyst to photocatalytically degrade organics and split water for hydrogen production under ultraviolet (UV) irradiation (about 5% of solar energy). However, the applications of the CeO2 photocatalyst are limited due to low photocatalytic efficiency under sunlight irradiation. In this study, a nanosized CeO2 powder was prepared by the precipitation method. Subsequently, various amounts of polyaniline (PANI) nanoparticles were deposited onto the surface of the CeO2 nanoparticles to form a heterostructure by the polymerization method. The crystal structure, morphology, surface and optical properties of the CeO2/PANI nanoparticles were investigated by X-ray diffractometry (XRD), scanning electron microscopy (SEM), Fourier-transform infrared spectroscopy (FTIR), ultraviolet-visible (UV-Vis) absorption spectroscopy, and photoluminescence (PL). Experimental results demonstrated that PANI deposition improved the light absorption of CeO2 nanoparticles in the visible light region. The heterostructured CeO2/PANI nanoparticle with 4 wt % PANI deposition exhibited optimal photocatalytic activities with a hydrogen production rate of 462 μmolg−1 within 6 h and a methyl orange (MO) degradation rate of 45% within 4 h under visible light irradiation. The photocatalytic mechanisms of the composite powder are also proposed in this report.