Single-atom catalysts (SACs) have great potential for hydrogen evolution reaction (HER) and oxygen evolution reaction (OER) since their high atomic utilization and strong metal–support interactions. Herein, we develop TM@C5N4 (TM = Fe, Co, Ni, Ru, Rh, Pd, Os, Ir and Pt) catalysts via embedding Group VⅢ TM in holey C5N4 substrate and further evaluate their electrocatalytic activity using density functional theory (DFT) calculations. Systematical studies indicate that Fe@C5N4, Pd@C5N4 and Ir@C5N4 catalysts all exhibit excellent HER performance, which mainly because of their small ΔGH* values of 0.101 eV, -0.114 eV and 0.070 eV, respectively. In parallel, Rh@C5N4 and Ir@C5N4 possess high OER activity along with low overpotential of 0.50 V, which is superior to the commercial IrO2 catalyst (0.56 V). Obviously, Ir@C5N4 could be utilized as bifunctional electrocatalysts both HER and OER in water splitting. Furthermore, we analyze their correlative catalytic mechanisms using the molecular orbitals. Besides, biaxial strain modulation could effectively regulate the catalytic activity of HER and OER. Particularly, 2 % biaxial tensile strain could bring Ir@C5N4 superb HER/OER catalytic performance. Finally, we anticipate that this strain engineering would provide a new perspective for developing high-performance SACs for water splitting.