Human lower limbs have particular flexibility. Both the efficiency of bipedal walking and the ability to protect actuators with low energy loss are worthy references for the design of bipedal robots. This paper proposes a design for a biped robot with joints of variable stiffness. The robot has three degrees of freedom in the sagittal plane in each leg. The hips and knees are driven directly by the motor, while the ankles are passive joints with adjustable stiffness. After a comprehensive investigation, a variable stiffness mechanism was introduced based on lever principles, and driven by a motor that can realize real-time adjustment. Simulations verified the necessity of variable stiffness joints in the robot. The variable stiffness joint can absorb the ground impact on each joint, reduce the energy loss of the motor, and improve the efficiency of movement.