Controlling the dynamics of DNA translocation is a central issue in the emerging nanopore-based DNA sequencing. To address the potential of heteroatom doping of carbon nanostructures and for achieving this goal, herein, we carry out atomistic molecular dynamics simulations for single-stranded DNAs translocating between two pristine or doped carbon nanotube (CNT) electrodes. Specifically, we consider the substitutional nitrogen doping of capped CNT (capCNT) electrodes and perform two types of molecular dynamics simulations for the entrapped and translocating single stranded DNAs. We find that the substitutional nitrogen doping of capCNTs facilitates and stabilizes the edge-on nucleobase configurations rather than the original face-on ones and slows down the DNA translocation speed by establishing hydrogen bonds between the N dopant atoms and nucleobases. Due to the enhanced interactions between DNAs and N-doped capCNTs, the duration time of nucleobases within the nanogap was extended by up to similar to 300%. Given the possibility to be combined with the extrinsic light or gate voltage modulation methods, the current work demonstrates that the substitutional nitrogen doping is a promising direction for the control of DNA translocation dynamics through a nanopore or nanogap, based of carbon nanomaterials.