In order to detect a magnetic resonance (MR) signal in an examination region of an examination subject in a measurement field of an MR system with an MR imaging sequence, a magnetization in the examination subject is generated with a polarization field B0. The MR system has a magnet to generate the polarization field B0 with a first field inhomogeneity across the measurement field. At least one RF pulse is radiated into the examination region. At least one first magnetic field gradient is activated for spatial coding of the MR signal. At least one pulsed compensation magnetic field gradient is activated that is generated by a temporally variable current that varies over the duration of the MR imaging sequence and that is activated over a compensation time period that is shorter than the total duration of the imaging sequence so that, during the compensation time period, the first field inhomogeneity is reduced to a second, lower field inhomogeneity across the measurement field.