A green and simple ‘one-pot’ electrochemical off–on approach to synthesize pyrimidin-2(1H)-ones was realized without any catalyst, oxidant and toxic reagent. The desired products were obtained in moderate to good yields after the stepwise ‘one-pot’ reaction. The results of control experiments and cyclic voltammetry indicated that the electrooxidation of DHPMs might proceed via two steps process losing