Based on a bimetallic sulfide, a hollow core–shell structure material, NiCo2S4@Ni2P, with a uniform type-I heterojunction achieved efficient photocatalytic H2 evolution.