A preparation method of 2-amino-4,6-dimethoxypyrimidine, using malononitrile and methanol as raw materials, using one of toluene, xylene, chlorobenzene, and dichloroethane as a solvent, through hydrogen chloride The aeration reaction generates 1,3-dimethoxypropanediimine dihydrochloride without filtration and other post-treatment operations. Add a water-insoluble organic base dropwise to the reaction system to adjust the pH of the reaction system to 6-8, and then add The solid reaction of cyanamide generates 3-amino-3-methoxy-N-nitrile-2-propionamidine, and then the heating reaction generates 2-amino-4,6-dimethoxypyrimidine product. The invention utilizes a one-pot method to prepare 2-amino-4,6-dimethoxypyrimidine, the reaction conditions are mild, safe and environmentally friendly, the process operation is simplified, the amount of three wastes is small, and the total synthesis yield of the four-step reaction can reach 80%. Above, the product content can reach more than 99%, which is suitable for green industrial production.