Precise control of Ru doping sites on Zn3V3O8 induces high catalytic activity. Specifically, the Ru-doped B-layer by replacing surface V shows the best OER catalytic effect, while the HER favors the Ru-doped D-layer by replacing surface Zn8.