As people’s living pace becoming faster and faster in modern society, a lot of machines which can substitute human beings, such as washing machine, dishwasher, have appeared. These machines can greatly save people the necessary labor times. The automatic cleaning wall mechanism which is studied in this paper belongs to a category of cleaning machine. It aims to clean the body cavity wall of a square. The primary research includes the mechanical structure design, the electrical control system design, and modal analysis for this mechanism in order to avoid resonance phenomena occurred between motors and bodies. At last, via experimental running, this mechanism can move forward according to our predetermined trajectory.