The decomposition of ammonia borane (NH3BH3) to produce hydrogen has developed a promising technology to alleviate the energy crisis. In this paper, metal and non-metal diatom-doped CoP as catalyst was applied to study hydrogen evolution from NH3BH3 by density functional theory (DFT) calculations. Herein, five catalysts were investigated in detail: pristine CoP, Ni- and N-doped CoP (CoPNi-N), Ga- and N-doped CoP (CoPGa-N), Ni- and S-doped CoP (CoPNi-S), and Zn- and S-doped CoP (CoPZn-S). Firstly, the stable adsorption structure and adsorption energy of NH3BH3 on each catalytic slab were obtained. Additionally, the charge density differences (CDD) between NH3BH3 and the five different catalysts were calculated, which revealed the interaction between the NH3BH3 and the catalytic slab. Then, four different reaction pathways were designed for the five catalysts to discuss the catalytic mechanism of hydrogen evolution. By calculating the activation energies of the control steps of the four reaction pathways, the optimal reaction pathways of each catalyst were found. For the five catalysts, the optimal reaction pathways and activation energies are different from each other. Compared with undoped CoP, it can be seen that CoPGa-N, CoPNi-S, and CoPZn-S can better contribute hydrogen evolution from NH3BH3. Finally, the band structures and density of states of the five catalysts were obtained, which manifests that CoPGa-N, CoPNi-S, and CoPZn-S have high-achieving catalytic activity and further verifies our conclusions. These results can provide theoretical references for the future study of highly active CoP catalytic materials.