Magnetic disk drives and associated methods are described for performing an active flying height compensation process for a slider of a magnetic disk drive. For the flying height compensation process, a control system in the disk drive detects a reduction in flying height of a slider in the disk drive. The control system then calculates a compensation heating power to apply to one or more heating elements that are fabricated in the slider to compensate for the reduction in flying height. The control system then applies the compensation heating power to the heating element(s) in the slider to alter the ABS (i.e., generate a protrusion) and increase the flying height of the slider.