The mechanics of a C 60 fullerene oscillating in a carbon nanotube (CNT) is investigated using continuum approximation and molecular dynamics (MD) simulations. The Lennard–Jones and Tersoff–Brenner potential functions are employed in this study; the former in the continuum model and both in the MD simulations. The results from the continuum model agree well with those from discrete model when nanotubes are assumed rigid. The flexibility effect of nanotubes on the oscillatory behavior is also examined using the MD simulations. It is shown the oscillation frequency slightly decreases during the simulation for flexible tubes, while it remains constant for rigid ones.