In the area of sustainable energy storage, batteries based on multivalent ions such as magnesium have been attracting considerable attention due to their potential for high energy densities. Furthermore, they are typically also more abundant than, e.g., lithium. However, as a challenge their low ion mobility in electrode materials remains. This study addresses the ionic conductivity of magnesium in spinel host materials based on periodic density functional theory calculations in order to identify the critical parameters which determine the mobility and insertion of ions. We will in particular highlight the critical role that trigonal distortions of the spinel structure play for the ion mobility. In detail, we will show that it is the competition between coordination and bond length that governs the Mg site preference in ternary spinel compounds upon trigonal distortions which can only be understood by also taking covalent interactions into account. Based on our theoretical study, we rationalize the impact of the metal distribution in the host material and the ion concentration on the diffusion process. Furthermore, cathode-related challenges for practical devices will be addressed. Our findings shed light on the fundamentional mechanisms underlying ionic conductivity in solid hosts and thus may contribute to improve ion transport in battery electrodes.