Heterostructures constructed by conventional methods, particularly those randomly distributed manner on the catalyst surface as well as forming core–shell structures, lead to imbalance in carrier utilization, limitation of charge extraction/transfer, and hindrance of light harvesting. In this study, we constructed a new type of heterostructure consisting of alternate CdS and ZnO grains bridged with good interfaces in the hierarchically periodic macroporous (HPM) walls by the pyrolysis of CdZnS solid solution in a polymethyl methacrylate nanoreactor. Since the alternately arranged CdS–ZnO heterojunctions in the HPM form multiple quantum well-like (MQW-like) band alignments that favor the Z-scheme charge transfer, the photogenerated electrons and holes are spatially separate and accumulated on CdS and ZnO parts, respectively. Besides the desirable spatial separation of the photogenerated charges, the enabled excellent mass transfer in the macroporous structures effectively accelerates the utilization of the carriers. Owing to the synergistic effect of the MQW-like band alignments and the HPM structures, the photocatalytic H2 evolution rate of HPM CdS–ZnO is as high as 587.8 μmol h–1 without a cocatalyst. This work introduces a fascinating strategy for the creation of alternate heterojunctions to improve carrier utilization.