This paper deals with the chaotic attitude motion of a magnetic rigid spacecraft with internal damping in an elliptic orbit. The dynamical model of the spacecraft is established. The Melnikov analysis is carried out to prove the existence of a complicated nonwandering Cantor set. The dynamical behaviors are numerically investigated by means of time history, Poincar@ map, Lyapunov exponents and power spectrum. Numerical simulations demonstrate the chaotic motion of the system. The input-output feedback linearization method and its modified version are applied, respectively, to control the chaotic attitude motions to the given fixed point or periodic motion.