Data hiding is popularly employed in protecting the copyright, secret information and communication secretly with the convenience of network communication. In order to reduce the amount the transmitted data via network, VQ (vector quantization) is applied to compressing the transmitted data. Since VQ is a low-bit-rate compression scheme, it is difficult to find large redundant hiding space and to get stego-images with high quality for hiding data in VQ-based compressed images. A hiding method for VQ-based compressed images is proposed in this paper according to the Hamming distance between the index values of codewords. Our method makes hiding data more effective and provides stego-images with higher quality than other conventional methods. Experimental results demonstrate the effectiveness and the feasibility of our method.