Semiconductorγ-ray detectors have broad applications, yet finding superior detector materials is a challenge because of its contradictory requirements. Here, we investigated a large set of native defects in Cs2Hg6S7 that has been suggested as a promising candidate for detector materials. Using first-principles calculations, we showed that S-vacancy and HgCs-antisite defect provide life-time limiting deep levels, and Cs-vacancy forms a shallow acceptor level, resulting in low resistivity. To decrease such detrimental effects, concentrations of defects and carriers were examined in various chemical environments, which reveal that carrier densities can be extremely reduced by adjusting Cs partial pressure.