A method for in situ Hall effect measurement under high pressure was developed on a diamond anvil cell. The electrode was accurately integrated on one diamond anvil with regular shape. A uniform and strong magnetic field was introduced into the sample zone. The voltage errors brought by some negative effects during the measurement were well eliminated. The correction factor of the Hall coefficient, brought by the nonpoint contact between the electrode and the sample, was 4.51%. The measurement error of the magnetic field did not exceed 1%. The carrier character of ZnTe powders was studied up to 23 GPa. The evolution of conductivity with pressure was explained based on the variation of the carrier behavior.