Potocatalytic hydrogen evolution represnets a promising way to achieve renewable energy sources. Dual heterojunctions with an inverse opal structure are proposed for addressing fundamental challenges (low surface area, inefficient light absorption, and poor charge separation) in photocatalytic water splitting. Inverse opal structure and Co3O4 were introduced to design and synthesize a ZnO/ZnS/Co3O4 (IO-ZnO/ZnS/Co3O4) photocatalyst. Morphology characterizations and photoelectric measurements reveal that the introduction of three-dimensional (3D) structures and dual heterojunctions improves light utilization efficiency and accelerates charge separation, greatly promoting photoelectric performance. The as-prepared IO-ZnO/ZnS/Co3O4 manifests superior photocurrent density (0.49 mA/cm2), which is 4 times higher than that of IO-ZnO/ZnS due to the existence of dual heterojunctions. The result is further confirmed by an enhanced H2 production rate (153.01 μmol/g/h) in pure water. Notably, excellent cycling stability is achieved in pure water because Co3O4 can rapidly capture photogenerated holes to inhibit severe photocorrosion of ZnO/ZnS. Therefore, this work presents a new insight into inhibiting photocorrosion of metal sulfides and promoting their photoelectric performance by combining 3D structures and dual heterojunctions.