We have carried out density functional theory calculation to study the evolution of geometric, energetic and electronic properties of Mgn (n = 2–10) clusters. The dispersion corrected ωB97X-D functional is found to be more efficient over the B3LYP + D3 method in determination of accurate structure and energetics of the gas phase small Mgn clusters. We have found that Mg4 possesses the smallest possible three-dimensional geometry and is the most stable cluster among the Mgn clusters studied here. We have therefore selected Mg4 cluster as a host for the doping of 3d transition metal (TM) atom to study the structural, electronic and magnetic properties of these TMMg30,+ clusters. MnMg3 and NiMg3+ clusters are found to be the most stable neutral and cationic TMMg3 clusters, respectively. The NBO and DOS analyses have shown that the stability of the TMMg30,+ clusters is governed by the charge transfer processes as well as the nature of interaction of the atomic orbitals. These studies also confirm that the neutral doped clusters exhibit covalent-like bonding while ionic type bonding is present in cationic clusters. Larger charge gains by the charge deficient TM cations from the Mg atoms in TMMg3+ make them relatively stable over the neutral clusters. The DOS and molecular orbital analyses reveal that the 3d orbitals of the dopant TM atoms actively participate in electronic charge transfer processes by maintaining their individuality in TMMg3 clusters, whereas they remain silent in this regard in case of TMMg3+ clusters. In both these cases, the TM0,+(3d) orbitals play the crucial role of tuning the magnetic moment. Therefore, the overall electronic structure and properties of TMMg30,+ clusters depend solely on the TM(3d) orbitals, which is governed by the charge transfer processes characterized by the charge state of the cluster.