We demonstrate an all-polarization-maintaining (PM) dispersion-managed mode-locked ytterbium-doped fiber oscillator based on a nonlinear amplifying loop mirror (NALM). Experimentally, three mode-locking regimes with distinct tailored spectra are achieved with carefully designed cavity setup and adjusted pump power. Using the dispersive Fourier transformation (DFT) technique, the real-time transition dynamics among these regimes are observed as the pump power decreases. It is revealed that the intracavity gain does not decrease continuously during the relaxation period of the gain fiber. Instead, it decreases first and then increases, ultimately leading to the overdriving of NALM. This is attributed to the increase in the population inversion rate of gain fiber under the remaining pump. The dynamic evolution of intracavity gain and non-monotonic transmission properties of NALM collectively induce chaotic pulsation during the transformation. This work not only provides a new perspective for the design and development of novel spectrum-tailored laser sources, but also deepens the understanding of the transient dynamics of ultrafast fiber lasers.