This research studies the nonlinear buckling of two-dimensional functionally graded (2D-FG) nanotubes with porosity based on the Zhang-Fu theory of tubes, Timoshenko beam theory, and the nonlocal gradient strain theory (NSGT) as well as Von-Karmen nonlinear theory. In this paper, the formulation of the problem for various boundary conditions is generated according to the energy method. Then, the results are extracted by incorporating the generalized differential quadrature method (GDQM) coupled with the iteration method. The accuracy of the results is proven through comparative studies, and finally, the impact of different parameters, which influence the buckling of the nanotube, is investigated.