In this work, electrospun nanofiber embedded with zinc oxysulfide (Zn(O,S)) has been demonstrated as an efficient and robust photocatalyst for hydrogenation of nitrobenzene to aniline under solar light irradiation at mild conditions with methanol as the hole scavenger. The solid solution state of Zn(O,S) in electrospun nanofiber was successfully revealed by high-resolution transmission electron microscopy and X-ray diffraction analyses in which the lattice fringes and diffraction planes located in between those of ZnO and ZnS phases. Moreover, the electrochemical and optical properties of Zn(O,S) embedded in polyethylene oxide (PEO) nanofiber are found to be better than those of ZnO and ZnS indicating more efficient photocatalytic activities as well. The photocatalytic hydrogenation of nitrobenzene to aniline occurred completely within 2 h of the photocatalytic reaction with a reusability of 95% after five consecutive runs. Finally, the mechanism of photocatalytic hydrogenation by Zn(O,S) embedded in the PEO (PZOS) nanofiber involves a total of six electrons (e-) and six protons (H+) to hydrogenate nitrobenzene to nitrosobenzene, phenylhydroxylamine, and aniline.