The removal of organic dyes and pathogenic bacteria from contaminated water remains a significant challenge. In the present study, S-type heterojunction Ag2MoO4/ZnFe2O4 (AMO/ZFO) composite nanofibers were synthesized by electrospinning and co-precipitation and fabricated into photoanodes. It is found that the constructed S-type heterojunction of AMO/ZFO composites effectively inhibits the recombination of photogenerated carriers, in addition to the benefits of more exposed active sites and a greater specific surface area. When several properties are improved, AMO/ZFO composites exhibit excellent photoelectrocatalytic performance. The results demonstrate that under visible light irradiation, the photoelectrocatalytic degradation rate of AMO/ZFO-3 to methylene blue reached 76.2% within 50 min, and the killing rate of Salmonella was 83.6% within 80 min. The enhanced photoelectrocatalytic activity was due to the synergy of both electrochemical and photocatalytic effects. More importantly, after four testing cycles, AMO/ZFO-3 still has a better ability to kill pathogenic bacteria and degrade organic dyes due to its high stability. This work provides a feasible method for oxidizing organic dyes and pathogenic bacteria.