Buckling and postbuckling analysis is presented for axially compressed microtubules (MTs) embedded in an elastic matrix of cytoplasm. The microtubule is modeled as a nonlocal shear deformable cylindrical shell which contains small scale effects. The surrounding elastic medium is modeled as a Pasternak foundation. The governing equations are based on higher order shear deformation shell theory with a von Kármán-Donnell-type of kinematic nonlinearity and include the extension-twist and flexural-twist couplings. The thermal effects are also included and the material properties are assumed to be temperature-dependent. The small scale parameter e (0) a is estimated by matching the buckling load from their vibrational behavior of MTs with the numerical results obtained from the nonlocal shear deformable shell model. The numerical results show that buckling load and postbuckling behavior of MTs are very sensitive to the small scale parameter e (0) a. The results reveal that the MTs under axial compressive loading condition have an unstable postbuckling path, and the lateral constraint has a significant effect on the postbuckling response of a microtubule when the foundation stiffness is sufficiently large.