Intravoxel dephasing due to macroscopic field variations along the slice-selective direction z can be compensated by application of compensation gradients in z-direction (“z-shimming”). Compensation gradients applied between echo acquisition allow to estimate R2* also in areas with strong field gradients. However, if equally strong compensation gradients are applied in each slice the signal dephases in homogenous areas. We therefore propose an adaptive method where slice-specific compensation gradients are estimated for each slice from a fast pre-scan. With the proposed approach improved R2*-maps, compared to constant compensation gradient strategies, with higher SNR and accuracy can be achieved.