High-peak-power transform-limited narrow-linewidth nanosecond all-fiber lasers are desired in a range of applications. However, their linewidths will be broadened by self-phase modulation (SPM). We propose a novel concept that generates transform-lim