Gradient-echo (GE) echo planar imaging (EPI) is susceptible to both geometric distortions and signal loss. This paper presents a retrospective correction approach based on nonrigid image registration. A new physics-based intensity correction factor derived to compensate for intravoxel dephasing in GE EPI images is incorporated into a previously reported nonrigid registration algorithm. Intravoxel dephasing causes signal loss and thus intensity attenuation in the images. The new rephasing factor we introduce, which changes the intensity of a voxel in images during the registration, is used to improve the accuracy of the intensity-based nonrigid registration method and mitigate the intensity attenuation effect. Simulation-based experiments are first used to evaluate the method. A magnetic resonance (MR) simulator and a real field map are used to generate a realistic GE EPI image. The geometric distortion computed from the field map is used as the ground truth to which the estimated nonrigid deformation is compared. We then apply the algorithm to a set of real human brain images. The results show that, after registration, alignment between EPI and multi-shot, spin-echo images, which have relatively long acquisition times but negligible distortion, is improved and that signal loss caused by dephasing can be recovered.