The present paper examines the thermal buckling of nonlocal magneto-electro-thermo-elastic functionally graded (METE-FG) beams under various types of thermal loading namely uniform, linear and sinusoidal temperature rise and also heat conduction. The material properties of nanobeam are graded in the thickness direction according to the power-law distribution. Based on a higher order beam theory as well as Hamilton's principle, nonlocal governing equations for METE-FG nanobeam are derived and are solved using Navier type method. The small size effect is captured using Eringen's nonlocal elasticity theory. The most beneficial feature of the present beam model is to provide a parabolic variation of the transverse shear strains across the thickness direction and satisfies the zero traction boundary conditions on the top and bottom surfaces of the beam without using shear correction factors. Various numerical examples are presented investigating the influences of thermo-mechanical loadings, magnetic potential, external electric voltage, power-law index, nonlocal parameter and slenderness ratio on thermal buckling behavior of nanobeams made of METE-FG materials.