  We present ab-initio calculations of photoionization thresholds and cross
sections of the negatively charged nitrogen-vacancy (NV) center in diamond from
the ground $^{3}\!A_2$ and the excited $^{3}\!E$ states. We show that after the
ionization from the $^{3}\!E$ level the NV center transitions into the
metastable $^{4}\!A_2$ electronic state of the neutral defect. We reveal how
spin polarization of $\mathrm{NV}^{-}$ gives rise to spin polarization of the
$^{4}\!A_2$ state, providing an explanation of electron spin resonance
experiments. We obtain smooth photoionization cross sections by employing dense
$k$-point meshes for the Brillouin zone integration together with the band
unfolding technique to rectify the distortions of the band structure induced by
artificial periodicity of the supercell approach. Our calculations provide a
comprehensive picture of photoionization mechanisms of $\mathrm{NV}^{-}$. They
will be useful in interpreting and designing experiments on charge-state
dynamics at NV centers. In particular, we offer a consistent explanation of
recent results of spin-to-charge conversion of NV centers.
