This study presented a new motion correction algorithm with the incorporation of convolutional neural network (CNN) derived prior image to solve the out-of-FOV motion problem. A modified U-net network was developed by introducing motion parameters into the loss function. We assessed the performance of the proposed CNN-based algorithm on 1113 MPRAGE images with simulated oscillating and sudden motion trajectories. Results show that the proposed algorithm outperforms conventional TV-based algorithm with lower NMSE and higher SSIM. Besides, robust reconstruction was achieved with even 20% data missed due to the out-of-FOV motion.