The invention discloses a functional ionic liquid that has high electrochemical stability and a preparation method thereof. Positive ion of the ionic liquid is selected from nitrile-functionalized quaternary ammonium positive ion and negative ion thereof from one of chlorine, bromine, iodine, fluoborate, fluorophosphates, sulfate radical, nitrate radical, trifluoroacetic radical, trifluorochloromethane sulfonic acid group, bi (perfluoroalkyl group sulfonyl) imino negative ion, dinitrile amic radical and saccharin acid radical. Nitrile functional ionic liquid, the negative ion of which is halogen negative ion, is firstly prepared through reaction of pentagons or hexatomic tertiary amine with the alkyl halide that has nitrile functional groups, then ionic liquid that contains different negative ions is prepared by exchange of the negative ions. The ionic liquid has very low melting temperature, can bear the high temperature of 150 DEG C and be stable to water, hardly has vapor pressure but has good electrochemical stability, thereby the invention can be taken as solvent, catalyst ligand, electrochemical electrolyte, etc. that are applied in the fields of organic synthesis, catalytic reaction and lithium-ion battery, etc.