A comparative study of the electrochemical intercalation of Ca2+ and Mg2+ in layered TiS2 using alkylcarbonate-based electrolytes is reported, and for the first time, reversible electrochemical Ca2+ insertion is proved in this compound using both X-ray diffraction and differential absorption X-ray tomography at the Ca L2 edge. Different new phases are formed upon M2+ insertion that are structurally characterized, their amount and composition being dependent on M2+ and the experimental conditions. The first phase formed upon reduction is found to be the result of an ion-solvated intercalation mechanism, with solvent molecule(s) being cointercalated with the M2+ cation. Upon further reduction, new non-cointercalated calcium-containing phases seem to form at the expense of unreacted TiS2. The calculated activation energy barriers for Ca2+ migration in TiS2 (0.75 eV) are lower than those previously reported for Mg (1.14 eV) at the dilute limit and within the CdI2 structural type. DFT results indicate that the...