An automatic segmentation algorithm based on a generative adversarial network was proposed to solve the problems of insufficient segmentation, fuzzy segmentation, boundary ambiguity, and low segmentation accuracy in the existing liver tumor CT image segmentation methods. The algorithm first performs liver pre-segmentation on CT images to reduce the influence of irrelevant information. Secondly, the generation network of GAN uses Dual Attention Unet (DAUnet), which introduces a dual attention mechanism in the jump connection to enhance the characteristics of liver tumors. Finally, the prediction accuracy of tumor images is improved by GAN-generated adversarial training, and a mixed loss function is introduced in the training process. Finally, experimental results on LiTS data show that the proposed algorithm’s Dice similarity coefficient (DSC) value reaches 76.15%, 3.63% higher than that of the Unet algorithm. DAUnet can effectively improve the performance of tumor segmentation in liver images by generating adversarial training.