Tetrahydro-1,3-dimethyl-2(1H) pyrimidine(DMPU) was prepared via cyclization and methylation reactions with 1,3-diaminopropane,urea,polyoxymethylene and formic acid as raw materials.The structure of the product was characterized by IR and 1H NMR,the purity of product was analyzed by gas chromatography,the water content in the product was determined by Karl fischer titration. The influences of solvent, material concentration,material ratio, reaction temperature and reaction time, catalyst on the synthesis process were studied. The best conditions were water-ethylene glycol solution was using as solvent when pyrimidine was prepared;the molar ratio of paraformaldehyde and formic acid was 1:3.75,reaction temperature was 110~120 ℃,reaction time was 16 h,cuprous chloride and triethylamine were selected as catalyst,and their amout was 1.0% of pyrimidine respectively. The yield of DMPU could reach 71% and the purity could reach 98.5%.