Inorganic semiconductors show interesting mechanical behavior in response to their surrounding lighting environments. In fact, we recently found out that zinc sulfide (ZnS) shows the light-illumination controlled plasticity at room temperature. However, its mechanism is poorly understood. Here we report systematic density functional theory results of electronic and atomic structures of glide partial dislocations in ZnS. We have revealed that partial dislocations in ZnS have excess electrostatic fields localized around their cores and can trap electrons or holes, depending on excess ionic species at the cores. Such carrier-dislocation interactions can induce energetically more stable bond reconstruction at their cores, as compared with the case before carrier trapping. Reconstructed bonds at the dislocation cores should be broken upon dislocation glide, and thus can restrict the dislocation motion significantly. Such reduced dislocation motion due to core reconstruction should give rise to increased plastic deformation stresses, namely, hardening of the materials under light illumination. The present results provide a critical understanding of the experimentally observed light-illumination controlled plasticity in ZnS at the electronic level, which is opposed to previously reported plasticity and dislocation motion in other elemental and III-V semiconductors.