The role of nitrogen doping on the stability and memory window of resistive state switching in N-doped Ta2O5 deposited by atomic layer deposition is elucidated. Nitrogen incorporation increases the stability of resistive memory states which is attributed to neutralization of electronic defect levels associated with oxygen vacancies. The density functional simulations with the screened exchange hybrid functional approximation show that the incorporation of nitrogen dopant atoms in the oxide network removes the O vacancy midgap defect states, thus nullifying excess defects and eliminating alternative conductive paths. By effectively reducing the density of vacancy-induced defect states through N doping, 3-bit multilevel cell switching is demonstrated, consisting of eight distinctive resistive memory states achieved by either controlling the set current compliance or the maximum voltage during reset. Nitrogen doping has a threefold effect: widening the switching memory window to accommodate the more intermediate states, improving the stability of states, and providing a gradual reset for multi-level cell switching during reset. The N-doped Ta2O5 devices have relatively small set and reset voltages (< 1 V) with reduced variability due to doping.