In this study, flower-shaped SnIn4S8 grew on the surface of ZnO was synthesized by solvothermal method to detect hexavalent chromium (Cr (VI)). The composition, surface structure, valence state, photoelectric capability of ZnO/SnIn4S8 were investigated through a series of characterizations. The results found ZnO/SnIn4S8 composites show better photocatalytic activities than these of ZnO and SnIn4S8. Meanwhile, the mass ratio of ZnO/SnIn4S8 could affect the photoelectric properties. When the mass ratio is 1: 4 (ZnO/SnIn4S8-4), it has the best performances among all the composites. Density function theory calculation (DFT) confirms the increased properties could originate from the form of a Z-scheme heterojunction between ZnO and SnIn4S8, which facilitates charge separation through the action of an internal electric field, and retains strong redox ability of electrons (e-) or holes (h+). When the photoelectrochemical sensor based on ZnO/SnIn4S8-4 was used to detect Cr (VI), it shows the linearity between 0.5 and 300 μM, and limit of detection is 0.039 μM. Thus, Z-scheme ZnO/SnIn4S8 heterojunction will provide new insights and potential application in Cr (VI) detection.