The exposed active sites of ZIF-8 is considered as the key to boost the kinetics of photoelectrochemical (PEC) water splitting. However, the terrible stability under irradiation and aqueous conditions significantly limit the practical application for fabricating the efficient photoeletrode. Herein, a novel strategy is employed for solving the stability of Zn-MOF (ZIF-8) by partially replacing Zn2+ ions by Ni2+ ions. The TiO2 photoelectrode is selected as a testing model to study the superiority of TiO2–ZnNi MOF for PEC water splitting. TiO2–ZnNi MOF exhibits a strong photocurrent density of 1.00 mA/cm2 (1.23 V vs. RHE), which is 2.7 and 1.7 times that of TiO2 and TiO2–Zn MOF, respectively. More importantly, the photocurrent density of TiO2–ZnNi MOF maintains almost 100% for 2 h, while TiO2–Zn MOF significantly decays to 81.6% for just 8.3 min, indicating the successful achievement for promoting the stability of Zn-MOF. Therefore, this work proposes a reasonable route to simultaneously enhance the PEC efficiency and stability of TiO2–Zn MOF for the first time, which provides a new guidance for the design of highly stable photoelectrode.