Scattering of light by cloud, haze, and fog decreases the transmission efficiency of communication channels in quantum key distribution (QKD), reduces the system's practical security, and thus constrains the deployment of free-space QKD. Here, we employ the wavefront shaping technology to compensate distorted optical signals in high-loss scattering quantum channels and fulfill a polarization-encoded BB84 QKD experiment. With this quantum channel compensation technology, we achieve a typical enhancement of about 250 in transmission efficiency and improve the secure key rate from 0 to 1.85 × 10 −6 per sifted key. The method and its first time validation show the great potential to expand the territory of QKD systems from lossless channels to highly scattered ones and therefore enhances the deployment ability of global quantum communication network.