In this letter, we report a novel fiber Bragg grating (FBG)‐based gain controller to simultaneously flatten and clamp the gain spectrum of a long‐wavelength‐band (L‐band) erbium‐doped fiber amplifier (EDFA). Respectively, the single‐ and dual‐FBG schemes are experimentally conducted and investigated in terms of flatness and dynamic stability with various central wavelengths. The results show that, under a suitable central wavelength of FBGs, the high average gain (over 22 dB) and ±0.1 dB stability in ∼30 dBm dynamic range is together guaranteed in our designed amplifier. In gain‐flatness, dual‐FBG scheme presents a smaller fluctuation (∼0.93 dB) in the range of 1570–1610 nm by accurately adjusting the voltage of PZT driver. Comparatively, single‐FBG scheme is more practical and controls the gain‐fluctuation of EDFA below 1.62 dB in the whole L‐band. © 2016 Wiley Periodicals, Inc. Microwave Opt Technol Lett 58:2168–2171, 2016