To meet the required manufacturing accuracy of high-quality aberration-corrected holographic gratings, we propose a moiré alignment algorithm for the exposure system of holographic gratings. A model holographic grating exposure system is built with multiple degrees of freedom based on optical path function theory. The whole process algorithm is then derived, including the fourth-order orthogonal polynomial of the holographic gratings, fitted aberration coefficients, and an optimized Levenberg-Marquardt algorithm for the exposure system's recording parameters. Finally, the simulated alignment and error analysis of a 2400 gr/mm aberration-corrected holographic grating's exposure system are presented. The proposed moiré alignment algorithm for such exposure systems can effectively improve the alignment accuracy, ensuring better holographic grating aberration correction ability.