Less than 1% of Earth’s freshwater reserves is accessible. Industrialization, population growth and climate change are further exacerbating clean water shortage. Current water-remediation treatments fail to remove most pollutants completely or release toxic by-products into the environment. The use of self-propelled programmable micro- and nanoscale synthetic robots is a promising alternative way to improve water monitoring and remediation by overcoming diffusion-limited reactions and promoting interactions with target pollutants, including nano- and microplastics, persistent organic pollutants, heavy metals, oils and pathogenic microorganisms. This Review introduces the evolution of passive micro- and nanomaterials through active micro- and nanomotors and into advanced intelligent micro- and nanorobots in terms of motion ability, multifunctionality, adaptive response, swarming and mutual communication. After describing removal and degradation strategies, we present the most relevant improvements in water treatment, highlighting the design aspects necessary to improve remediation efficiency for specific contaminants. Finally, open challenges and future directions are discussed for the real-world application of smart micro- and nanorobots.