Using a microcircuit fabricated in a diamond anvil cell, we carried out in situ conductivity measurements on α-HgS and β-HgS under high pressure, and investigated the temperature dependence of the conductivity of the samples under several pressures. For α-HgS, the results show that the conductivity increases rapidly with increasing pressure from 8 to 20GPa. The energy gap was obtained by fitting linearly the plot of the logarithm of conductivity versus the reciprocal of temperature. At 29GPa, the sample becomes metallic, characterized by a negative temperature slope of conductivity and a zero energy gap. For β-HgS, a discontinuity of conductivity was observed at 5GPa, corresponding to a transition from the β phase to the α phase. From 5 to 20GPa, the conductivity rises rapidly with increasing pressure. At 27GPa, the sample becomes metallic. In comparison with HgSe and HgTe, we obtained experimentally the transition pressure of the two samples from the cinnabar structure to the rock-salt structure, respectively.