By virtue of the systematic effects of S-doping on CeO2 and the ultrathin shell structure of CdS, the CeO2−xSx@CdS nanocomposite exhibits excellent photocatalytic activity under visible-light illumination for both H2 evolution (rate up to 1147.2 μmol g−1 h−1) and RhB degradation (efficiency reached 99.8%) as compared to CeO2, CeO2−xSx, and CdS.