Stability analyses of perfect and imperfect cylindrical shells under axial compression and torsion were presented. Finite element method for the stability analysis of perfect cylindrical shells was put forward through comparing critical loads and the first buckling modes with those obtained through theoretical analysis. Two typical initial defects, non-circularity and uneven thickness distribution, were studied. Critical loads decline with the increase of non-circularity, which exist in imperfect cylindrical shells under both axial compression and torsion. Non-circularity defect has no effect on the first buckling mode when cylindrical shell is under torsion. Unfortunately, it has a completely different buckling mode when cylindrical shell is under axial compression. Critical loads decline with the increase of thickness defect amplitude, which exist in imperfect cylindrical shells under both axial compression and torsion, too. A greater wave number is conducive to the stability of cylindrical shells. The first buckling mode of imperfect cylindrical shells under torsion maintains its original shape, but it changes with wave number when the cylindrical shell is under axial compression.