This research discussed a deep learning method based on an improved generative adversarial network to segment the hippocampus. Different convolutional configurations were proposed to capture information obtained by a segmentation network. In addition, a generative adversarial network based on Pixel2Pixel was proposed. The generator was a codec structure combining a residual network and an attention mechanism to capture detailed information. The discriminator used a convolutional neural network to discriminate the segmentation results of the generated model and that of the expert. Through the continuously transmitted losses of the generator and discriminator, the generator reached the optimal state of hippocampus segmentation. T1-weighted magnetic resonance imaging scans and related hippocampus labels of 130 healthy subjects from the Alzheimer's disease Neuroimaging Initiative dataset were used as training and test data; similarity coefficient, sensitivity, and positive predictive value were used as evaluation indicators. Results showed that the network model could achieve an efficient automatic segmentation of the hippocampus and thus has practical relevance for the correct diagnosis of diseases, such as Alzheimer's disease.