In this research, a size-dependent Euler–Bernoulli beam model is proposed for nonlinear free vibration of a bi-directional functionally graded (BFG) based on a three-layered nonlinear elastic foundation within the framework of the modified couple stress (MCS) theory. The nonlinearity due to the stretching effect of the mid-plane of the BFG microbeam is the source of the nonlinearity of the assumed free vibration issues. The motion governing equations and the corresponding boundary conditions are derived by applying the principle which is associated to Hamilton, under the assumption that the axial inertia is negligible. By applying cubic nonlinearity via Galerkin’s method, the partial nonlinear differential equation can be reduced and turned into an ordinary nonlinear equation of the differential. Then, Galerkin’s variational method is used to gain proximate analytical expressions for the nonlinear frequency of microbeams with boundary conditions of pinned–pinned ends and clamped–clamped ends. The precision of the present solution is evaluated through comparing the nonlinear frequency provided by the proposed approach with the results available from previous studies. The influence of changes in some parameters such as amplitude ratio, the material length scale parameter, material gradient parameters, end supports and stiffness coefficients of the foundation with nonlinearity on the normalized fundamental frequency is studied in detail. As a main result, it is observed that the nonlinear vibration frequencies are higher than their linear counterparts.