With escalating global demands for clean energy, the investigation of electrochemical reactions such as Oxygen Reduction Reaction (ORR), Oxygen Evolution Reaction (OER), and Hydrogen Evolution Reaction (HER) is essential for advancing sustainable energy and storage technologies. This paper employs density functional theory (DFT) to explore the ORR, OER, and HER properties of pristine Co-N-C and B-doped Co-N-C catalysts. Results reveal that B doping balances the adsorption energies of reaction intermediates, significantly enhancing catalytic efficiency. Co-N-C-B3 demonstrates the lowest recorded overpotentials for ORR, OER, and HER at 0.2 V, 0.4 V, and 0.07 V, respectively. Post-B doping, a marked increase in the electronic state density is observed in the Co 3d and N 2p orbitals near the Fermi level, with a new electronic state emerging in the B 2p orbital, which enhances the electronic structure's activity. The d-band center shifts from-0.82 to-0.57 eV, indicating an upward shift in the energy distribution of d-orbital electrons, reducing reaction energy barriers and improving electron transfer efficiency. This study deepens the understanding of Co-N-C catalysts and lays a theoretical foundation for developing efficient electrocatalysts from two-dimensional carbon materials.