Ammonia (NH3) is a vital chemical compound in industry and agriculture, and the electrochemical nitrogen reduction reaction (eNRR) is considered a promising approach for NH3 synthesis. However, the development of eNRR faces the challenge of high overpotential and low Faradaic efficiency. In this work, graphyne (GY) is anchored by 3d, 4d, and 5d dual transition metal atoms to form diatomic catalysts (DACs) and is roundly investigated as an electrocatalyst for eNRR via density functional theory calculations. Due to the protrusion of anchored metal atoms, the active sites of GY are better exposed compared to other substrates, exhibiting higher activity. Through four-step hierarchical high-throughput screening (ΔG*N2 < 0 eV, ΔG*N2→*N2H < 0.4 eV, ΔG*NH2→*NH3 < 0.4 eV, and ΔG*N2 < ΔG*H), the number of selected catalysts in each step is 325, 240, 145, and 20, respectively. Considering a series of factors, including stability, initial potential, and selectivity, 13 kinds of eligible catalysts are identified. Optimal eNRR paths studies show that the best catalyst Mn2@GY features no onset potential. For the three catalysts (Mn2@GY, Ir2@GY, and RhOs@GY), the onset potentials of the most favorable eNRR pathways are -0.07, -0.12, and -0.17 V, respectively. The excellent catalytic activity can be credited to the effective charge transfer and orbital interaction between the active site and adsorbed N2. Our work demonstrates the significance of DACs for ammonia synthesis and provides a paradigm for the study of DACs even for other important reactions.