The invention relates to a preparation method for 5-azacytosine. The preparation method comprises: firstly reacting formic acid with a part of dicyandiamide at 50-60 DEG C, adding the residual dicyandiamide in batches after the reaction is steady, reacting at a constant temperature of 50-60 DEG C for 4 h, then heating to 100-110 DEG C and reacting for 1 h, adding acetic anhydride by dividing into two times, raising the temperature and performing refluxing reaction for 2 h, cooling to 60-70 DEG C, adding ethanol, continuing to cool to room temperature, filtering to obtain a 5-azacytosine crude product, then adding a mixed solution of ethyl acetate and ethanol, filtering and baking to dry, so as to obtain the 5-azacytosine finished product. The beneficial effects comprise that the prepared 5-azacytosine has the HPLC purity of 98.5% or more, has the impurity 1 content less than 0.5% and the impurity 2 content less than 0.1%, and the preparation method is good in technological safety, free of technological wastewater and suitable for large-scale industrialized production.