The state of vanishing friction known as superlubricity has important applications for energy saving and increasing the lifetime of devices. Superlubricity, as detected with atomic force microscopy, appears when sliding large graphite flakes or gold nanoclusters across surfaces, for example. However, the origin of the behavior is poorly understood because of the lack of a controllable nanocontact. We demonstrated the superlubricity of graphene nanoribbons when sliding on gold with a joint experimental and computational approach. The atomically well-defined contact allows us to trace the origin of superlubricity, unraveling the role played by ribbon size and elasticity, as well as by surface reconstruction. Our results pave the way to the scale-up of superlubricity and thus to the realization of frictionless coatings.