In complex systems like aircraft engines and oil refinery machines, pipeline inspection is an essential task for ensuring safety. Here, we proposed a type of smart material–driven pipeline inspection robot (weight, 2.2 grams; length, 47 millimeters; diameter, <10 millimeters) that could fit into pipes with sub-centimeter diameters and different curvatures. We adopted high–power density, long-life dielectric elastomer actuators as artificial muscles and smart composite microstructure–based, high-efficiency anchoring units as transmissions. Fast assembling of components using magnets with an adjustable number of units was used to fit varying pipeline geometries. We analyzed the dynamic characteristics of the robots by considering soft material’s unique properties like viscoelasticity and dynamic vibrations and tuned the activation voltage’s frequency and phase accordingly. Powered by tethered cables from outside the pipe, our peristaltic pipeline robot achieved rapid motions horizontally and vertically (horizontal: 1.19 body lengths per second, vertical: 1.08 body lengths per second) in a subcentimeter-sized pipe (diameter, 9.8 millimeters). Besides, it was capable of moving in pipes with varying geometries (diameter-changing pipe, L-shaped pipe, S-shaped pipe, or spiral-shaped pipe), filled media (air or oil), and materials (glass, metal, or carbon fiber). To demonstrate its capability for pipeline inspection, we installed a miniature camera on its front and controlled the robot manually from outside. The robot successfully finished an inspection task at different speeds.