Limited by the severe carrier recombination and insufficient active sites of the catalyst, achieving efficient photocatalytic water oxidation remains a major challenge. Herein, a core–shell zeolite imidazole skeleton (ZIF) based material with rich active sites in its interior is obtained by in-situ growth carbonization two steps method. According to characterization, performance testing and photoelectric experiments, it is confirmed that the ZIF67@ZIF8-2-800 material has good photogenerated carrier separation efficiency and surprising O2 production. The reason for the performance improved is that ZIF8 as a shell prevents the agglomeration of active sites CoO in the carbonization process of ZIF67. Theoretical calculations reveal that the core–shell structure has a favorable influence on the separation of photogenerated carriers. The N atom acts as an electron transport mediator, transferring electrons from the CoO core to the NC shell, while the holes remain in the CoO to participate in the photocatalytic water oxidation reaction.