A model is derived to study the post-buckling of functionally graded nanobeams. The model incorporates nonlocal stress and microstructure-dependent strain gradient effects. Closed-form solutions for post-buckled configuration and critical buckling force are derived. Stiffness-hardening or stiffness-softening effects can be found and depend on the values of small-scaled parameters.