Weak redox ability and severe charge recombination pose significant obstacles to the advancement of CO2 photoreduction. To tackle this challenge and enhance the CO2 photoconversion efficiency, fabricating well-matched S-scheme heterostructure and establishing a robust built-in electric field emerge as pivotal strategies. In pursuit of this goal, a core-shell structured CuInS2@CoS2 S-scheme heterojunction was meticulously engineered through a two-step molten salt method. This approach over the CuInS2-based composites produced an internal electric field owing to the disparity between the Fermi levels of CoS2 and CuInS2 at their interface. Consequently, the electric field facilitated the directed migration of charges and the proficient separation of photoinduced carriers. The resulting CuInS2@CoS2 heterostructure exhibited remarkable CO2 photoreduction performance, which was 21.7 and 26.5 times that of pure CuInS2 and CoS2, respectively. The S-scheme heterojunction photogenerated charge transfer mechanism was validated through a series of rigorous analyses, including in situ irradiation X-ray photoelectron spectroscopy, work function calculations, and differential charge density examinations. Furthermore, in situ infrared spectroscopy and density functional theory calculations corroborated the fact that the CuInS2@CoS2 heterojunction substantially lowered the formation energy of *COOH and *CO. This study demonstrates the application potential of S-scheme heterojunctions fabricated via the molten salt method in the realm of addressing carbon-related environmental issues.