Niobate perovskites like the (K,Na)NbO 3 (KNN) family are among the most important lead-free ferroelectrics. Ba and Ni have been co-doped into KNN to induce Ni 2+ -oxygen vacancy defect dipoles to significantly reduce the band gap while maintaining the ferroelectricity. This opens doors to novel optoferroelectric applications such as multisensors and photocatalysts. However, obtaining a single phase of the above co-doped KNN is difficult due to the sensitive stoichiometry on phase formation and arduous nickel diffusion into the KNN unit cells during synthesis. This paper reports an alternative approach to simultaneously tune the band gap and ferroelectricity. A-site vacancies are intentionally introduced into the mixtures of starting reactants. The homogeneously distributed vacancies trigger self-assembly of a niobate perovskite and niobate tungsten bronze phase and thus form a composite. The interface between the two phases, which mimics a heterojunction, rather than any individual phase, is proven to be responsible for the resultant narrow band gap and strong ferroelectricity. Hypotheses are proposed based on the results of ferroelectric, photoconductivity, and density functional theory-based studies to explain the mechanism. This paper offers an additional option to engineer polarizations and band structures in complex photoferroelectric oxides, especially alkaline niobates.