High peak power, single frequency nanosecond fiber lasers have aroused the intense interest in their applications such as nonlinear frequency generation, LIDAR, and remote sensing. However, self-phase modulation (SPM) will induce a temporally dependent phase shift φNL (L, t)=|Ap (0, t)|2γLeff, where Ap is the amplitude of pump wave, γ is the nonlinear parameter, and Leff is the effective fiber length. The nonlinear phase shift will broaden the spectral linewidth of pulsed laser, which degrades the coherence of the laser and influences the performance of the laser. In order to obtain laser pulses with narrower linewidth, we can phase-modulate the pulsed laser with a value of-φNL(L,t). Thus, the SPM induced the nonlinear phase shift can be eliminated, and the spectra of pulsed laser can remain during the amplification and transmission in the fiber. Stimulated Brillouin scattering (SBS) has very low threshold and should be taken into consideration in narrow linewidth fiber lasers. The SBS threshold, which is dependent on the linewidth of laser, will be changed at the same time when the SPM is pre-compensated for. Because the SPM pre-compensation will change the linewidth of the pulsed laser. According to three coupled amplitude equations, we numerically analyze the influence of SPM pre-compensation on SBS threshold and spectral characteristics. The stimulation results show that in a master oscillator power amplifier structured fiber laser system, when SPM is completely compensated for (φM(t)=φNL(L,t)), the spectrum of the output pulsed laser can be maintained as that of the laser seed, but the SBS threshold usually decreases. When the SPM is compensated for incompletely (φM(t) φNL(L,t)), the spectral linewidth of the output laser cannot be compressed to that of the laser seed, and the SBS threshold in this situation is lower than the SBS threshold obtained when φM(t)=φNL(L,t). When the SPM is overcompensated for (φM(t) > φNL(L, t)), the spectral linewidth of the output laser cannot be compressed to that of the laser seed either, but the the SBS threshold in this situation is higher than the SBS threshold when φM(t)=φNL(L,t). We also build an experimental setup to verify the feasibility of SPM compensation. In our experiment, the linewidth of the pulsed laser is reduced from 1.4 GHz to 120 MHz when SPM is compensated for by phase modulation. The SBS threshold of the system are measured before and after SPM pre-compensation, and correctness of theoretical simulation is experimentally verified. This analysis method can provide the design guidelines for narrow-linewidth pulsed fiber laser systems.