The influence of bare and solvated cations imbedded inside single-walled carbon nanotubes (SWCNTs) on the SWCNT electronic properties is studied by ab initio electronic structure calculations. The roles of ion charge and ion solvation are investigated by comparing Li+ vs Mg2+ and Li+ vs its solvatocomplex with two ethylene carbonate (EC) molecules, [Li(EC)2]+. Two achiral nanotubes with similar radii but different electronic structure are considered, namely, the metallic, (15,15) armchair, and semiconducting, (26,0) zigzag, SWCNTs. The intercalation process is energetically favorable for both CNT topologies, with all bare cations and the solvatocomplex under investigation, with the doubly charged Mg2+ ion exhibiting the highest energy gain. Insertion of the bare ions into the SWCNTs increases the electronic entropy. The electronic entropy changes because the ions introduce new energy levels near the Fermi level. Those initially empty levels of the cations accept electron density and generate electronic ho...