A series of Mg doped ZCFAO (Zn0.3−xMgxCu0.7Al0.3Fe1.7O4 (0.05 ≤ x ≤ 0.25) spinel samples were synthesized by solid state reaction method. XRD, was utilized to investigate the structure phase, microstructural characteristics, The optical properties were analyzed; Biological instruments Sp-150 potentiostate is employed to investigate the dielectric measurements in the frequency range of 10 Hz to 1 MHz at various temperatures from 300 to 650 K. Vibrating sample magnetometer VSM was employed to examine the magnetic characteristics in the applied magnetic field ranging from − 20 to 20 kG. The creation of a single-phase cubic spinel was validated by X-ray analysis. The leverage of replacing Zn by Mg leads to enhancement in the lattice parameters, reducing both of the degree of inversion, crystal distortion and compelled these samples to be normal spinel. It turned out that as the degree of inversion sank, the crystallite size declined. The values of dislocations density was found in the order of 10−5 which reveal improving and completing the crystallization of the ferrite samples. The samples have an optical energy gap in the range 3.1–3.38 eV, according to the inferred optical characteristics. The dielectric constant revealed the normal behavior of spinel ferrite it decreases with increasing frequency and enhanced with increasing temperature. It seems that the microstructure of the compound consists of both high-conductive grains and low-conductive grain boundaries, which has been confirmed by the complex impedance. Additionally, the presence of the Maxwell–Wagner relaxation process is also detected. This information can provide valuable insights into the properties and behavior of the compound. Using Nyquist plot, the sample impedance characteristics were interpreted while taking grain and grain boundary contributions into account. The magnetic properties proved that doping ZCFAO with diamagnetic cations (Mg) increases both of saturation magnetization from 16.416 up to 29.983 emu/g and the magnetocrystalline anisotropic constant from 1319.24 to 1612.804 because the two main factors that influence the magnetic properties are the distribution of cations between the octahedral and tetrahedral sites and the magnetic moment of each of its cations. Novelty of our work replacing Zn by Mg (both of them diamagnetic materials) enhance the magnetic properties. Synthesized materials may reexamine the mechanisms underlying Mg2+ induced cationic exchange in ZCFAO and have prospective uses as soft-magnetic materials.