Two interesting compounds such as quaternary ammonium lignin(QAL) and 2-ethylhexyl phosphoric acid mono-2-ethylhexyl ester (P507) were synthesized as ionic liquids(QP-ILs) for the extraction of metal ions. The extraction behavior of Co(II) and Ni(II) from chloride solution was compared between QP-ILs and P507. The results showed that the extraction rates of Co(II) and Ni(II) in the two solutions varied with the extraction conditions, but QP-ILs has stronger extractability for cobalt than P507, while Ni is on the contrary. Under the same conditions, the Co/Ni separation performance(βCo/Ni) in QP-ILs is superior to that in p507. At pH4.0, 55℃, concentration of 20%, extraction time of 10 minutes, the βCo/Ni of QP-ILs reached to 2703, while that of P507 was only 164. In conclusion, QP-ILs was more efficient than P507 for separating Co from mixed solutions.