Facing the safety and feasibility problems of the existing active capsule robots, a legged capsule robot is proposed based on telescopic and translational mechanisms. The telescopic mechanism adopts the micro link structure, while the translational mechanism adopts the screw-nut structure. With the constraints of spatial location, speed and driving force, these two mechanisms are modeled and analyzed to optimize the dimensional parameters and motor operating parameters. After the optimization, the range of the telescopic speed is 16.8 mm/s∼34.2 mm/s, the range of the telescopic force is 2.45N∼0.44 N, and the range of the telescopic efficiency is 92.8%∼34.0%. Meanwhile, the translational speed, the force and the efficiency remain constant basically, which are 50 mm/min, 4.20 N and 50% respectively. The length and the outer diameter of the driving unit in the capsule robot are 33mm and 16mm respectively. Finally, the performance of the legged capsule robot is tested in the porcine colon, and the result shows that it can realize the telescopic and translational locomotion efficiently and safely with the mean speed of 25 mm/min.