In this work, a novel heterojunction composite Ag2S/KTaxNb1-xO3 was designed and synthesized through a combination of hydrothermal and precipitation procedures. The Ta/Nb ratio of the KTaxNb1-xO3 and the Ag2S content were optimized. The best 0.5% Ag2S/KTa0.5Nb0.5O3 (KTN) sample presents an enhanced photocatalytic performance in ammonia synthesis than KTN and Ag2S. Under simulated sunlight, the NH3 generation rate of 0.5% Ag2S/KTN reaches 2.0 times that of pure KTN. Under visible light, the reaction rate ratio of the two catalysts is 6.0. XRD, XPS, and TEM analysis revealed that Ag2S was intimately decorated on the KTN nanocubes surface, which promoted the electron transfer between the two semiconductors. The band structure investigation indicated that the Ag2S/KTN heterojunction established a type-II band alignment with intimate contact, thus realizing the effective transfer and separation of photogenerated carriers. The change in charge separation was considered as the main reason for the enhanced photocatalytic performance. Interestingly, the Ag2S/KTN composite exhibited higher NH3 generation performance under the combined action of ultrasonic vibration and simulated sunlight. The enhanced piezo-photocatalytic performance can be ascribed that the piezoelectric effect of KTN improved the bulk separation of charge carriers in KTN. This study not only provides a potential catalyst for photocatalytic nitrogen fixation but also shows new ideas for the design of highly efficient catalysts via semiconductor modification and external field coupling.