In this study the compatibility of chitosan (CS) with divalent inorganic salt is discussed. Solid polymer electrolytes (SPEs) consist of CS as a host polymer and magnesium triflate (MgTf) as a dopant divalent salt have been prepared by solution cast technique. The room temperature DC ionic conductivity of CS-based SPE containing 50 wt% of MgTf is determined to be around ≈10−4 S/cm. The surface morphology of the films are then examined using a field emission scanning electron microscopy (FE-SEM). The crystalline phase of pure CS is found to reduce upon the addition of MgTf salt. The compatibility of CS with divalent salts are discussed at high salt concentration on the bases of the surface morphology and X-ray diffraction (XRD) results. The smooth surface micrographs and broad peaks of XRD spectra are interpreted in reference to lattice energy and cationic size of salt. The smooth surface and low resistance (Rb = 47.8 Ohm) at high salt content (50 wt%) are clear signs that CS is more compatible with divalent salts than with other monovalent salts. At low temperature range, the DC conductivity versus 1000/T is shown to follow the Arrhenius equation. The dispersion region of AC conductivity spectra has been used to calculate the frequency exponent, s. Based on the value of s as a function of temperature, different ion transport models have been discussed to interpret the pattern of DC ionic conductivity versus 1000/T. The appearance of peaks in M″ spectra and their absence in ɛ″ spectra reveals that the relaxation process is a non-Debye type.