In this paper, a novel scheme, which introduces the technology of the code index modulation (CIM) into the realm of enhanced spatial modulation (ESM), named CIM-ESM, is proposed to achieve high spectral efficiency and high energy efficiency in multiple-input multiple-output (MIMO) systems. In the CIM-ESM scheme, information bits are conveyed not only by modulated symbols and spreading code indices, but also by the indices of the active antenna and constellation combinations. Meanwhile, the mathematical expressions for the average bit error probability (ABEP) in the presence of channel estimation errors, data rate, energy efficiency, and complexity of the CIM-ESM scheme are deduced. To achieve a higher transmission rate and code utilization, we further propose an enhanced scheme, named joint CIM-ESM (JCIM-ESM) scheme. In the JCIM-ESM scheme, spreading codes are jointly selected to form spreading code pairs and the matching indices of the spreading code pairs are utilized to convey extra information bits. Finally, Monte Carlo simulation results corroborate the tightness of the derived ABEP expression in the high signal-to-noise ratio region and reveal that both the CIM-ESM and JCIM-ESM schemes can provide better performance than CIM spread spectrum (CIM-SS), generalized CIM-aided spatial modulation (GCIM-SM), generalized space CIM (GSCIM), and CIM-aided QSM (CIM-QSM) schemes.