Electrides usually have topological properties and high electrical conductivity, so searching for superconducting electrides over a wide range of temperature and pressure is a hot topic in condensed matter physics. Based on high-throughput structure search and the first-principles calculations, we predict that $2H\text{\ensuremath{-}}\mathrm{V}{\mathrm{N}}_{2}$ is a thermodynamically and dynamically stable electride with the superconducting transition temperature (${T}_{c}$) of 51 K at ambient pressure. From the calculations of the electronic localization function, it is found that the excess unpaired electrons of the V atoms are likely to exist in the lattice vacancies as interstitial electrons, which makes $2H\text{\ensuremath{-}}\mathrm{V}{\mathrm{N}}_{2}$ an electride. On the other hand, the existence of irreducible representation at the vacancies also confirms that $2H\text{\ensuremath{-}}\mathrm{V}{\mathrm{N}}_{2}$ is an electride. Moreover, the flat bands, primarily originating from the V-$d$ orbitals, and the nesting of the Fermi surface induce a high density of states. This enhances the electron-phonon coupling (EPC) strength between the V-$d$ orbitals and the phonon modes associated with the vibrations of N atoms. The calculated EPC strength of $2H\text{\ensuremath{-}}\mathrm{V}{\mathrm{N}}_{2}$ electride at ambient pressure is 1.06, and the superconducting gap vanishes at 51 K. We find that $2H\text{\ensuremath{-}}\mathrm{V}{\mathrm{N}}_{2}$ electride has a ${T}_{c}$ of 51 K at ambient pressure, which gives a practicable method to connect the superconducting properties and the specificities of electrides in unitary material.