The gyroscopic moments generated by flywheels or control moment gyroscopes have important applications in spacecraft attitude stability and control. However, most of the current research has focused on the effect of gyroscopic torques on the attitude stability of spacecrafts on circular orbits, with little discussion of the case of elliptical orbits. In this paper, we investigate the stability of a particular cylindrical precession in an elliptical orbit by simplifying the spacecraft to a dynamically symmetric gyrostat consisting of a rotor and a platform. In the case of circular orbits, the system discussed here is autonomous, whereas in the case of elliptical orbits it is a periodic Hamiltonian system. The stability of cylindrical precession has been investigated analytically for the case of circular orbits. In the case of elliptical orbits, Floquet theory was used to numerically obtain the unstable regions and linear stable regions of the cylindrical precession. The nonlinear stability was further investigated in the linear stability region of the cylindrical precession. The results indicated that, in the case of the circular orbit, the cylindrical precession can be stabilized as long as the gyroscopic moment is large enough. However, the system may lose its stability even if the gyroscopic torque is sufficiently large in an elliptical orbit. Moreover, we present the effect of gyroscopic moments on the stability of cylindrical precession in three different elliptical orbits with eccentricities of 0.05, 0.2, and 0.5, using stability diagrams.