Presented herein is a comprehensive study on the buckling and postbuckling analysis of microbeams made of functionally graded materials (FGMs) based on the modified strain gradient theory. The present model is developed in the skeleton of the Timoshenko beam theory and the von Karman geometric nonlinearity, and enables one to consider size effects through introducing material length scale parameters. Also, the current model can be reduced to the modified couple stress and classical models if two or all material length scale parameters are set equal to zero, respectively. Utilizing a power law function, the volume fraction of the ceramic and metal phases of the functionally graded microbeam is expressed. The stability equations and corresponding boundary conditions are derived using Hamilton's principle and then solved through the generalized differential quadrature (GDQ) method in conjunction with a direct approach without linearization. The effects of the length scale parameter, slenderness ratio, material gradient index and boundary conditions on the buckling and postbuckling behavior of microbeams are carefully studied. Furthermore, the non-dimensional critical axial load of microbeams predicted by modified strain gradient and classical theories for the first three postbuckling modes is investigated and it is observed that the classical theory underestimates the non-dimensional critical axial load, especially at higher postbuckling modes. In addition, the influence of imperfections on the deflection of microbeams in prebuckled and postbuckled states is discussed.