PurposeAdaptive radiotherapy requires auto‐segmentation in patients with head and neck (HN) cancer. In the current study, we propose an auto‐segmentation model using a generative adversarial network (GAN) on magnetic resonance (MR) images of HN cancer for MR‐guided radiotherapy (MRgRT).Material and methodsIn the current study, we used a dataset from the American Association of Physicists in Medicine MRI Auto‐Contouring (RT‐MAC) Grand Challenge 2019. Specifically, eight structures in the MR images of HN region, namely submandibular glands, lymph node level II and level III, and parotid glands, were segmented with the deep learning models using a GAN and a fully convolutional network with a U‐net. These images were compared with the clinically used atlas‐based segmentation.ResultsThe mean Dice similarity coefficient (DSC) of the U‐net and GAN models was significantly higher than that of the atlas‐based method for all the structures (p < 0.05). Specifically, the maximum Hausdorff distance (HD) was significantly lower than that in the atlas method (p < 0.05). Comparing the 2.5D and 3D U‐nets, the 3D U‐net was superior in segmenting the organs at risk (OAR) for HN patients. The DSC was highest for 0.75–0.85, and the HD was lowest within 5.4 mm of the 2.5D GAN model in all the OARs.ConclusionsIn the current study, we investigated the auto‐segmentation of the OAR for HN patients using U‐net and GAN models on MR images. Our proposed model is potentially valuable for improving the efficiency of HN RT treatment planning.