Channel reciprocity is the foundation for physical layer key generation, which is influenced by noise, hardware impairments, and synchronization offsets. Weak channel reciprocity will result in a high key disagreement rate (KDR). The existing solutions for improving channel reciprocity cannot achieve satisfactory performance improvements. Furthermore, the existing quantization algorithms generally use one-dimensional channel features to quantize and generate secret keys, which cannot fully utilize channel information. The multidimensional vector quantization technique also needs to improve in terms of randomness and time complexity. This paper proposes a physical layer key generation scheme based on deep learning and balanced vector quantization. Specifically, we build a channel reciprocity compensation network (CRCNet) to learn the mapping relationship between Alice and Bob’s channel measurements. Alice compensates for channel measurements via a trained CRCNet to reduce channel measurement errors between legitimate users and enhance channel reciprocity. We also propose a balanced vector quantization algorithm based on integer linear programming (ILP-BVQ). ILP-BVQ reduces the time complexity of quantization on the basis of ensuring key randomness and a low KDR. Simulation results showed that the proposed CRCNet performs better in terms of channel reciprocity and KDR, while the proposed ILP-BVQ algorithm improves time consumption and key randomness.