Litter nowadays presents a significant threat to the equilibrium of many ecosystems. An example is the sea, where litter coming from coasts and cities via gutters, streets, and waterways, releases toxic chemicals and microplastics during its decomposition. Litter removal is often carried out manually by humans, which inherently lowers the amount of waste that can be effectively collected from the environment. In this paper, we present a novel quadruped robot prototype that, thanks to its natural mobility, is able to collect cigarette butts (CBs) autonomously, the second most common undisposed waste worldwide, in terrains that are hard to reach for wheeled and tracked robots. The core of our approach is a convolutional neural network for litter detection, followed by a time‐optimal planner for reducing the time needed to collect all the target objects. Precise litter removal is then performed by a visual‐servoing procedure which drives the nozzle of a vacuum cleaner that is attached to one of the robot legs on top of the detected CB. As a result of this particular position of the nozzle, we are able to perform the collection task without even stopping the robot's motion, thus greatly increasing the time‐efficiency of the entire procedure. Extensive tests were conducted in six different outdoor scenarios to show the performance of our prototype and method. To the best knowledge of the authors, this is the first time that such a design and method was presented and successfully tested on a legged robot.