Single-atom catalysts (SACs) have attracted considerable interest in the fields of energy and environmental science due to their adjustable catalytic activity. In this study, we investigated the matching of valence electron numbers between single atoms and adsorbed intermediates (O, N, C, and H) in MXene-anchored SACs (M-Ti2C/M-Ti2CO2). The density functional theory results demonstrated that the sum of the valence electron number (VM) of the interface-doped metal and the valence electron number (VA) of the adsorbed intermediates in M-Ti2C followed the 10-valence electron matching law. Furthermore, based on the 10-valence electron matching law, we deduced that the sum of the valence electron number (k) and VM for the molecular adsorption intermediate interactions in M-Ti2CO2 adhered to the 11-valence electron matching law. Electrostatic repulsion between the interface electrons in M-Ti2CO2 and H2O weakened the adsorption of intermediates. Furthermore, we applied the 11-valence electron matching law to guide the design of catalysts for nitrogen reduction reaction, specifically for N2 → NNH conversion, in the M-Ti2CO2 structure. The sure independence screening and sparsifying operator algorithm was used to fit a simple three-dimensional descriptor of the adsorbate (R2 up to 0.970) for catalyst design. Our study introduced a valence electron matching principle between doped metals (single atoms) and adsorbed intermediates (atomic and molecular) for MXene-based catalysts, providing new insights into the design of high-performance SACs.