We theoretically study the role of nitrogen incorporation into Al 2 O 3 -based resistive random-access memory (ReRAM) by using first-principles calculations. In ReRAM devices, the oxygen vacancy (V O ) has been believed to be the origin of ON–OFF switching. We reveal that the V O formation energy is significantly reduced by nitrogen incorporation into Al 2 O 3 , resulting in a forming-free ReRAM device. Moreover, nitrogen atoms tend to favorably couple with oxygen vacancies, stabilizing the conductive filament by suppression of V O diffusion. Accordingly, nitrogen incorporation improves the quality of Al 2 O 3 -based ReRAM devices.