Heterostructured photocatalysis is a significant issue owing to the unique band alignment, improved spectrum absorption, and enhanced photocatalytic activity. However, the construction of uniform, controllable, and effective heterojunctions is still a huge challenge. Herein, NaNbO3 /Nb3 O7 F heterojunctions are fabricated through an in situ corrosion technique for the first time. The influence of phase transformation on the hydrogen evolution reaction (HER) activity is investigated systematically in terms of photocatalytic water splitting for H2 production. Interestingly, the band realignment and good interfacial contact endow the NaNbO3 /Nb3 O7 F heterojunctions with a high HER activity (43.3 mmol g-1 h-1 ), which is about 2.4 times that of pure Nb3 O7 F and 1.36 times that of pure NaNbO3 . The results may provide some new insights into the corrosion technique and HER activity of novel heterostructured catalysts.