The buckling behavior of a nonuniform single-walled carbon nanotube (SWCNT), subjected to axially compressive load, is studied using the nonlocal elasticity theory. The differential transformation method (DTM) has been used to obtain the nonlocal buckling loads of the nonuniform SWCNT under various boundary conditions, namely simply supported, fixed–fixed, and fixed-simply supported. The nanotube’s nonlocal buckling load increases significantly with an increase in the tip’s diameter; however, it decreases substantially with increasing the small-scale parameter for both uniform and nonuniform SWCNTs. The results obtained from the DTM agree well with those reported in the literature for uniform SWCNTs. The accuracy of the results revealed that DTM is useful and convenient for investigating the buckling behavior of nonuniform CNTs with small-scale effects for various boundary conditions compared to other analytical methods. This work would provide helpful insights into the design of nonuniform CNT-based devices.