Efficient charge separation is one of the critical issues for the design of photocatalytic systems. The physical mixing of photocatalysts and cocatalysts to prepare photocatalytic systems usually leads to a high interfacial resistance, which is not beneficial to efficient charge separation. Here, we report the in situ construction of photocatalytic systems by directly growing CdS nanosheets on porous carbon aerogels (CA) to obtain photocatalytic systems with compact interfacial contact. The photocatalytic H 2 yield of the optimized CdS@ CA composite is ∼27.3 mmol/g, obviously higher than that of CdS nanosheets (∼11.4 mmol/ g). Electrochemical and spectroscopic methods demonstrate that the incorporation of carbon aerogels with CdS nanosheets can efficiently inhibit the recombination of photo-generated electrons and holes, thus achieving highly improved photocatalytic H 2 production.