In the framework of nonlocal strain gradient theory, the nonlinear vibration of beams subjected to different types of functionally graded distribution is studied in this paper. They are beams with bottom-up functionally graded distribution, beams with inside-out functionally graded distribution and beams with mirror symmetrical functionally graded distribution. The effective material properties of FGM beams are defined based on the proposed assumptions and approximate models. Different displacement functions that can satisfy the stress boundary conditions are used to analyze respective types of FGM beam. The governing equations of nonlinear vibration, including a material length-scale parameter and a nonlocal parameter are derived via the principle of Hamilton, then solved by a two-step perturbation method. With the aid of the obtained analytical solutions, the effects of various parameters on nonlinear vibration problem are studied in detail, including temperature, nonlocal parameter, strain gradient parameter, scale parameter ratio, slenderness ratio, volume index and different kinds of functionally graded distribution. Two new approaches are suggested in this study to change linear and nonlinear frequencies of the beam.