A convenient and versatile method was developed for the separation and detection of alkaline earth metal ions by ion chromatography with indirect UV detection. The chromatographic separation of Mg , Ca , and Sr was performed on a carboxylic acid base cation exchange column using imidazolium ionic liquid/acid as the mobile phase, in which the imidazolium ionic liquid acted as an UV-absorption reagent. The effects of imidazolium ionic liquids, detection wavelength, acids in the mobile phase, and column temperature on the retention of Mg , Ca , and Sr were investigated. The main factors influencing the separation and detection were the background UV absorption reagent and the concentration of hydrogen ion in ion chromatography with indirect UV detection. The successful separation and detection of Mg , Ca , and Sr within 14 min were achieved using the selected chromatographic conditions, and the detection limits (S/N = 3) were 0.06, 0.12, and 0.23 mg/L, respectively. A new separation and detection method of alkaline earth metal ions by ion chromatography with indirect UV detection was developed, and the application range of ionic liquids was expanded.