Hi is it necessary to retain lithium as lithium chloride? It is possible to precipitate our magnesium chloride as magnesium hydroxide by addition of hydroxide, filter the solution will give you lithium (probable mix of chloride and hydroxide).
Addition of barium hydroxide solution to precipitate magnesium hydroxide, later addition of sulphuric acid to remove barium as barium sulphate.
You can precipitate out lithium as lithium sulphate by addition of excess sulphuric acid and heat the solution.
It is better to convert both lithium chloride and magnesium chloride firstly to hydroxide form by adding NaOH.
Lithium hydroxide is an inorganic compound with the formula LiOH. It is a white hygroscopic crystalline material. It is soluble in water and slightly soluble in ethanol,
Magnesium hydroxide is an inorganic compound with the chemical formula of hydrated Mg(OH)2. It is often known as milk of magnesia, because of its milk-like appearance as a suspension. While magnesium hydroxide has a low solubility in water, with a Ksp of 1.5×10−1.
Then, you filter to remove Magnesium hydroxide.
Therefore, you convert LiOH to lithium carbonate by passing CO2 gas. Finally, treat this carbonate with HCl to get LiCl.
We could consider the following precipitation-based method, to separate LiCl (aq) from MgCl2 (aq). ― By adding milk of lime (≤ 30 wt%) and heating the brine (but not boiling), a precipitate containing Mg(OH)2 and Ca(OH)2 is obtained: MgCl2 (aq) + Ca(OH)2 (aq) → Mg(OH)2 (s)↓ + CaCl2 (aq). LiCl also reacts, to form LiOH (aq): 2LiCl (aq) + Ca(OH)2 (aq) → 2LiOH (aq) + CaCl2 (aq). Mg(OH)2 precipitates with lime. By washing the precipitate with icy water, Ca(OH)2 can be selectivity dissolved, thus being separated from Mg(OH)2 if that is found convenient. Mother liquor is obtained, containing LiOH and CaCl2. Isopropyl alcohol or ethanol can be added to the mother liquor, to facilitate precipitation of LiOH·H2O. NaOH could also be added for the same purpose, by taking advantage of the common ion effect. Precipitation can be also facilitated by cooling the mother liquor (without freezing it), possibly by adding ice. After neutralization of the precipitated LiOH·H2O with diluted HCl (aq), LiCl (aq) is obtained. This salt can then be crystallised as hydrate, which can be dried at 130 ºC (≥ 1h) for the anhydrous salt to be obtained.