The conversion of dinitrogen to ammonia under mild conditions is of great importance. The redox property of dinitrogen in P_<14>NTf_2 ionic liquid containing Cp_2TiCl_2 under dinitrogen atmosphere was studied, and the effect of coordination of ^-NTf_2 anion to Cp_2TiCl_2 was discussed. Electrolysis of dinitrogen in water divided with Nafion ^[○!R]212 with this system showed the generation of ammonia. Controlled-potential electrolysis of dinitrogen to ammonia at -2.65 V (vs. Fc/Fc^+) was carried out, the maximum current efficiency being 4.68 %.