Four acids were used as the mobile phase of ion exchange chromatography to analyze magnesium, calcium, zinc, and iron ions, and nitric acid showed the best character. The amino acid ionic liquid was then added to the mobile phase to analyze its effect on the retention time, peak height and resolution of detected cations. When the imidazole glycine ionic liquid was used, the retention time was reduced, peak shape was improved, resolution of analytes was optimized and the detect limit was reduced effectively. The optimum conditions of this experiment were that adding 0.10 mM imidazole glycine ionic liquid to mobile phase and the flow rate of mobile phase was 0.8 mL·min−1 at room temperature. Under these conditions, the peak area was proportional to the concentration of cations, and the linear equations of the magnesium, calcium, zinc, iron ions were S = 0.0126 + 4.4463 C, S = –0.0452 + 3.9224 C, S = –0.0241 + 7.461 C, and S = –0.0213 + 6.3154 C, and the detection limits of four ions were 0.96, 3.58, 2.12, 0.57 μg·L−1 respectively. Furthermore, this method was successfully applied in determining cations in actual samples.