The invention relates to a mechanical device for achieving a two-dimension closed motion trail through a single power source. The mechanical device comprises a device bottom plate, a low-position trail changing slope, a high-position trail changing slope, a trail changing locating mechanism, a sliding rail, a sliding block, a high-position rack mechanism, a low-position rack mechanism, a gear, a screw rod, a nut, guide rods, a roller shaft, a roller and a return-to-zero mechanism. Under driving of the forward and reverse power sources, the mechanical device can generate the two-dimension closed motion trail. The mechanical device has the advantages that the structure is simple, rigidity and precision are high, pure mechanical coupling is achieved, the trail is easy to adjust, and reliability is quite high. The mechanical device adapts to high-temperature, low-temperature, strong-electromagnetism, strong-vibration, dust and corrosive gas environments, and is a solution scheme for replacing multi-power-source relevant equipment and executing the single repeated motion.