Purpose A new unsupervised learning method was developed to correct metal artifacts in MRI using 2 distorted images obtained with dual-polarity readout gradients. Methods An unsupervised learning method is proposed for a deep neural network architecture consisting of a deep neural network and an MR image generation module. The architecture is trained as an end-to-end process without the use of distortion-free images or off-resonance frequency maps. The deep neural network estimates frequency-shift maps between 2 distorted images that are obtained using dual-polarity readout gradients. From the estimated frequency-shift maps and 2 distorted input images, distortion-corrected images are obtained with the MR image generation module. Experiments using synthetic data and actual MR data were performed to compare images corrected by several metal-artifact-correction methods. Results The proposed method resolved the ripple and pile-up artifacts in the reconstructed images from synthetic data and actual MR data. The results from the proposed method were comparable to those from supervised-learning methods and superior to the compared model-based method. The proposed unsupervised learning method enabled the network to be trained without labels and to be more robust than supervised learning methods, for which overfitting problems can arise when using small training data sets. Conclusion Metal artifacts in the MR image were drastically corrected by the proposed unsupervised learning method. Two distorted images obtained with dual-polarity readout gradients are used as the input of the deep neural network. The proposed method can train networks without labels and does not overfit the network, even with small training data sets.