Based on first-principles calculations within the framework of density functional theory, the structural features, electronic and optical properties of sulfur-doped ZnO nanowires are systematically investigated in this work, revealing the regulation mechanism of doping on material performance. The results show that sulfur incorporation induces local lattice distortions in ZnO, resulting in a substitutional doping structure. These structural modifications significantly affect the electronic properties, causing the Fermi level to shift toward the bottom of the conduction band and a redshift in the band gap. Importantly, the orbital-projected band structures reveal that the 3p orbitals of sulfur generate impurity states near the top of the valence band, thereby enhancing both carrier concentration and mobility. Furthermore, sulfur doping leads to a notable change in the optical properties, including the emergence of new characteristic peaks in both the real and imaginary parts of the dielectric function, as well as considerable increases in optical parameters such as the absorption coefficient, extinction coefficient, and reflectivity. Moreover, as the doping concentration increases, the changes in optical properties become more pronounced. Overall, this investigation offers valuable theoretical insights into optimizing the performance of sulfur-doped ZnO nanowires in optoelectronic applications, such as photodetectors and light-emitting diodes, revealing the intrinsic correlation mechanism between the microscopic electronic structure and the macroscopic optical response.