The recently introduced ion trap for FT-ICR mass spectrometers with dynamic harmonization showed the highest resolving power ever achieved both for ions with moderate masses 500-1000 Da (peptides) as well as ions with very high masses of up to 200 kDa (proteins). Such results were obtained for superconducting magnets of very high homogeneity of the magnetic field. For magnets with lower homogeneity, the time of transient duration would be smaller. In superconducting magnets used in FT-ICR mass spectrometry the inhomogeneity of the magnetic field in its axial direction prevails over the inhomogeneity in other directions and should be considered as the main factor influencing the synchronic motion of the ion cloud. The inhomogeneity leads to a dependence of the cyclotron frequency from the amplitude of axial oscillation in the potential well of the ion trap. As a consequence, ions in an ion cloud become dephased, which leads to signal attenuation and decrease in the resolving power. Ion cyclotron frequency is also affected by the radial component of the electric field. Hence, by appropriately adjusting the electric field one can compensate the inhomogeneity of the magnetic field and align the cyclotron frequency in the whole range of amplitudes of z-oscillations. A method of magnetic field inhomogeneity compensation in a dynamically harmonized FT-ICR cell is presented, based on adding of extra electrodes into the cell shaped in such a way that the averaged electric field created by these electrodes produces a counter force to the forces caused by the inhomogeneous magnetic field.