Pure disulfide () with a proper band gap (∼1.53 eV) is a promising photovoltaic material, yet it exhibits a relatively low power-conversion efficiency among the -III- (III = , ; VI = , ) chalcopyrite solar cells. First-principles calculations show that the inferior photovoltaic performance of solar cells can be attributed to several factors, including a strong compensation effect, great band-tail states, and defect levels within the band gap, which result in a limited carrier concentration and severe nonradiative recombination of carriers. The strong compensation effect between the donor and or V acceptor defects makes it difficult to maintain a desired p-type conductivity as the elemental chemical potential changes. Besides, - and -related defects induce a downward shift of the conduction-band minimum and an upward shift of the valence-band maximum, respectively. The presence of the -defect level within the band gap is inevitable under the -poor and -rich conditions required for the p-type characteristic of . To address these issues, we find that phosphorus () incorporation, forming an isoelectronic defect complex, can enhance the p-type characteristic by consuming the residual electrons of -donor defects and alleviate their band-tail states by introducing substantial atomic orbital coupling of and defects. Moreover, the required -rich, -poor, and -rich conditions, to facilitate the formation of the beneficial defect complex, can also suppress the formation of defects, accordingly, reducing the associated band-tail state and defect state. This study reveals the origins of the stagnated efficiency of and that defect-complex engineering by anion doping is a feasible way to improve the electronic properties of multicomponent semiconductors.