The general steps for the synthesis of 5,6-diamino-1-methyluracil from 6-amino-1-methyl-5-nitrosouracil are as follows: in order to improve the conversion of the reaction, the catalytic reduction reaction system of 6-amino-5-nitroso-1-methyluracil was optimized, and the post-treatment steps were adapted to obtain a high separation yield. The specific optimization steps were as follows: 1) 0.4 g of ammonium metatungstate-modified palladium metal catalyst (see Example 1 for preparation) was added to 80 ml of isopropanol with 10.0 g of 6-amino-5-nitroso-1-methyluracil substrate, and placed in a hydrogenation reactor with stirring; 2) the air in the hydrogenation reactor was displaced with nitrogen three times, and the temperature of the reactor was adjusted to 55° C. The reaction was carried out under a hydrogen pressure of 0.3 MPa The reaction was carried out under 0.3 MPa hydrogen pressure. After 2 hours of reaction, the reaction was analyzed by HPLC (99.6% conversion and 98.3% selectivity), the stirring was stopped, the hydrogen pressure was released, and the reactor was cooled down to room temperature. 3) The reaction solution was filtered to remove the catalyst, and the filtrate was collected and heated up to 50-60°C. 4) Pure water was slowly added dropwise to the hot filtrate until it appeared turbid, then the dropwise addition was paused and the solution was left for 2 hours. Continue adding water dropwise until no more crystals were precipitated (a total of 45 ml of water was added dropwise, of which 10 ml was added at the time of initial turbidity and 35 ml was added dropwise), the mixture was cooled down to 10 ℃, filtered and dried, to obtain a light yellow 5,6-diamino-1-methyluracil (92.3% yield by weight, 99.4% purity by volume).