The electronic structures and magnetic properties of spinel Co1-x Zn (Cd)xFe2O4 (x = 0.0, 0.25, 0.5, 0.75, and 1.0) have been studied systematically by the first-principles calculation. The optimized structures show that with increasing Zn (Cd) content the crystal lattice parameter increases by 1.47% (5.13%) when the Co ions are completely replaced by Zn (Cd) ions. The results also indicate that the magnetic moment of Co/Fe ion increases and the total spin magnetic moment linearly increases with the Zn (Cd) doping from 3.00 μB for x = 0.0 up to 10.00 μB for x = 1.0 per formula unit. The electronic distribution in the Co spin-down subband is highly localized for the crystal field splitting between t2g and eg levels in the Zn (Cd) doped CoFe2O4 compounds and the energy band moves downwards while doped with Zn (Cd). Meanwhile, the bandgap decreases with the increase of Zn (Cd) except where x = 1 and the spinel structure is half-metal at some degree of doping.