In this work, DFT calculations were used firstly to simulate the nitrogen coordinated metal single-atom catalysts (M-Nx SACs, M = Hg, Cu, Au, and Ru) to predict their catalytic activities in acetylene hydrochlorination. The DFT results showed that Ru-Nx SACs had the best catalytic performance among the four catalysts, and Ru-Nx SACs could effectively inhibit the reduction of ruthenium cation. To verify the DFT results, Ru-Nx SACs were fabricated by pyrolyzing MOFs in-situ spatially confined metal precursors. The N coordination environment could be controlled by changing the pyrolysis temperature. Catalytic performance tests indicated that low N coordination number (Ru–N2, Ru–N3) exhibited excellent catalytic activity and stability compared to RuCl3 catalyst. DFT calculations further revealed that Ru–N2 and Ru–N3 had a tendency to activate HCl at the first step of reaction, whereas Ru–N4 tended to activate C2H2. These findings will serve as a reference for the design and control of metal active sites.