Nanoscale surface modification, by the interaction of sliding surfaces and mobile nanoparticles, is a critical parameter for controlling friction, wear and failure of surface structures. Here we demonstrate how nanoparticles form and interact in real-time at moving nanocontacts, with reciprocating wear tests imaged in situ at the nanoscale over [300 cycles in a transmission electron microscope. Between sliding surfaces, friction-formed nanoparticles are observed with rolling, sliding and spinning motions, dependant on localised contact conditions and particle geometry. Over periods of many scratch cycles, nanoparticles dynamically agglomerate into elongated clusters, and dissociate into smaller particulates. We also show that the onset of rolling motion of these particles accompanies a reduction in measured friction. Introduction of nanoparticles with optimum shape and property can thus be used to control friction and wear in microdevices.