Aiming to the problems of low embedding capacity and poor visual quality of the extracted secret images in existing generative data hiding algorithms, a generative data hiding algorithm based on multi-scale attention was proposed. First, a generator with dual encode-single decode based on multi-scale attention was designed. The features of the cover image and secret image were extracted independently at the encoding end in two branches, and fused at the decoding end by a multi-scale attention module. Skip connections were used to provide different scales of detail features, thereby ensuring high-quality of the stego-image. Second, self-attention module was introduced into the extractor of the U-Net structure to weaken the deep features of the cover image and enhance the deep features of the secret image. The skip connections were used to compensate for the detail features of the secret image, so as to improve the accuracy of the extracted secret data. At the same time, the adversarial training of the multi-scale discriminator and generator could effectively improve the visual quality of the stego-image. Experimental results show that the proposed algorithm can achieve an average Peak Signal-to-Noise Ratio (PSNR) and Structure Similarity Index Measure (SSIM) of 40.93 dB and 0.988 3 for the generated stego-images, and an average PSNR and SSIM of 30.47 dB and 0.954 3 for the extracted secret images under the embedding capacity of 24 bpp.