Density functional theory and molecular dynamics were used to study the generation of hydrogen peroxide around a nickel atom anchored on a pyridine-like nitrogen-doped graphene (PNG) layer. First, we found that two hydrogen molecules are adsorbed around the nickel atom, with adsorption energy 0.95 eV/molecule. Then we studied the interaction of oxygen molecules with this system at atmospheric pressure and 300 K. It is found that two hydrogen peroxide molecules are formed. However, at 700 K, one hydrogen peroxide molecule, and one water molecule are desorbed. One oxygen atom stays bound to the nickel atom.