Abstract Two-electrode configuration was developed for high-pressure dielectric detecting based on in situ impedance measurement in a diamond anvil cell. The electrodes were accurately integrated on diamond anvils with regular shape. The configuration was evaluated and proved to be effective by detecting the dielectric properties of KNbO3 under high pressure. The first-principles calculations performed on the cubic phase revealed that the pressure decreases the conductivity by increasing the electronic band gap. The dEg/dP obtained from theoretical method fits quite well with the experimental result dlnR/dP. The pressure-induced enhancement in electron localization causes the decrease of relative permittivity in the cubic phase.