A kind of narrow-linewidth fiber laser was developed. A segment of Er-doped fiber is connected after the active phase-shifted fiber grating. A distributed feedback (DFB) fiber laser is realized using a 980 nm laser for pump. The erbium ions in the Er-doped fiber are pumped from ground-state to excited state by the residual pump power, so the output power of the DFB fiber laser is amplified effectively, and the pump power is fully used. In this way, the power consumption and the cost are reduced greatly. Temperature-control techniquc is used to deal with the temperature-sensitivity of the DFB fiber laser. The high-frequency modulation is realized by using a piezo-electric actuator when the phase-shifted fiber grating is mounted on its surface. In our experiment, the highest modulation frequency, the output power and the linewidth of the fiber laser are 2 kHz, 15.6 dBm and 300 kHz, respectively.