We demonstrate a scheme of high-peak-power, single-frequency nanosecond fiber laser based on self-phase modulation (SPM) pre-compensation and master oscillator power amplifier (MOPA) configuration. The pulsed seed is generated by modulation a single-frequency continuous wave (CW) laser, and is then phase modulated to compensate SPM induced spectral broadening. It is testified by our experiment that high-peak-power, single-frequency pulsed fiber laser can be obtained in this way and the linewidth was reduced from 1.4 GHz to 120 MHz.