Homojunction is a viable alternative strategy to realize excellent charge separation for enhancing photoelectrocatalytic performance. However, the feasible regulation of the homojunction interface remains challenging. Herein, a ZnO n-p homojunction with the piezotronic effect is constructed via an in-situ solvothermal method for enhancing photoelectrocatalytic activity. ZnO nanorods are transformed from n-type to p-type ZnO nanoparticles with zinc vacancies, leading to the n-p homojunction. The optimal NPZ-36 exhibits a superior photocurrent density of 1.56 mA/cm2 at 1.23 V vs. RHE and a high incident photon to current conversion efficiency of 75 % at 360 nm. Impressively, with the merits of inherent piezoelectric and photocatalytic properties of wurtzite ZnO, the piezoelectric-enhanced photoelectrochemical activity originates from the simultaneous promotion of bulk charge transfer and interfacial charge separation in ZnO n-p homojunction. The photocurrent density of NPZ-36–900 can reach to 2.02 mA/cm2 under the stirring rate of 900 rpm, which is 2.1 times higher than that of pure ZnO photoanode.