In this study, a new code index modulation (CIM) aided spatial modulation (SM) technique based on the Euclidean distance and capacity optimized based antenna selection (EDAS/COAS), called EDAS/COAS-CIM-SM, is proposed for multiple input multiple output (MIMO) systems. Since in the proposed EDAS/COAS-CIM-SM technique, incoming information data bits indicates modulated symbols, activated transmit antenna indices as well as their corresponding spreading code indices, data bits are conveyed not only by the modulated symbols but also by the indices of the active antenna and spreading code indices. Thus, the proposed two systems provide faster data rates while spending less transmission power and possessing better error performance than the conventional direct sequence spread spectrum (DS SS), SM, EDAS and COAS based SM (EDAS SM, COAS SM), and CIM based SS (CIM SS) systems. In addition, in order to improve the overall performance of the CIM aided SM (CIM SM) system, EDAS and COAS techniques are considered at the receiver. Computer simulations have also shown that the EDAS/COAS-CIM-SM system has better error performance than the CIM SM system over the Rayleigh fading channels for binary phase shift keying (BPSK) modulation schemes.