Revealing the distinction between rolling and sliding at the nanoscale is crucial for understanding the nanoscale tribology. To address this issue, we studied the rolling and sliding of single-walled carbon nanotubes (CNTs) on graphene using density functional theory augmented with many-body dispersion (MBD) forces method. We find that the motion of CNTs on graphene is changed from sliding to rolling with increasing the CNT radius, in which Pauli repulsion dominates rolling and MBD interactions dictate sliding. In addition, armchair CNTs always generate larger barriers than zigzag CNTs with similar radius regardless of rolling and sliding. These phenomena originate from the decay and fluctuations of charge density with respect to the distance between CNTs and graphene. Based on the potential corrugation of CNT motion on graphene, we also extend a model to capture the viscous friction of rolling and sliding with the experimental accuracy, providing a reasonable mechanistic picture for understanding the available experimental findings.