Systems containing 1-alkyl-3-methylimidazolium chloride ionic liquid and chlorine gas were investigated. Using relativistic density functional theory, we calculated the formation mechanism of trichloride and hydrogen dichloride anions in an Emim(+)Cl(-) + Cl(2) system. Emim(+)Cl(3)(-) forms without energy barriers. The more stable species ClEmim(+)HCl(2)(-) forms through chlorine substitution. Substitution of a H on the imidazolium ring is much easier than substitution on the alkyl side chains. Infrared, Raman, ESI-MS, and (1)H NMR spectra were measured for EmimCl, BmimCl, and DmimCl with and without Cl(2) gas. The coexistence of Cl(3)(-) and HCl(2)(-), as well as chlorine-substituted cations, was confirmed by detection of their spectroscopic signals in the Cl(2) added ionic liquids. Cl substitution appears less serious for cations with longer side chains.