Digital micromirror devices (DMDs) provide high refresh rates for fast light modulation in wavefront shaping. However, the binarized modulation of the optical field by the DMDs introduces a constant direct current (DC) optical field, which causes non-negligible background noise. This limits the modulation accuracy in DMD-based wavefront shaping. To address this, we propose a high-precision wavefront shaping method based on high-pass filtering, which eliminates the DC optical field and improves the anti-scattering focusing by filtering out the low-frequency spatial components. The experimental results show that this method significantly reduces the speckle similarity of optical fields modulated by different DMD patterns through the same scattering medium. Compared with the conventional method, this method can improve the anti-scattering focusing contrast by 1.7 times.