A nitrogen-doped carbon supported Co/Ni bimetallic catalyst 2wt%Co/Ni@NC-700-10 was prepared and found to be efficient in the reductive N-formylation of 2,4-diamino-5-nitroso-6-hydroxypyrimidine (DANHP) to 2,4-diamino-5-formyl-6-hydroxypyrimidine (DAFHP) for the synthesis of guanine. Under optimal conditions, the conversion of DANHP reached up to 95.6% with a DAFHP selectivity of 97.6%. The characterization results revealed that the cobalt/nickel nanoparticles of the catalyst uniformly dispersed and encapsulated in the nitrogen-dopped carbon, and the catalyst has the characters of large surface area, as well as uniform dispersion and small diameters of metal nanoparticles in the form of Co/Ni alloy, which endowed its good catalytic performance in the reaction.