The invention relates to a rigidity variable robot towards a minimally invasive surgery and a working method. The rigidity variable robot comprises a mechanical arm, wherein a front end is connected with a mechanical arm support fixed on a bottom plate, the mechanical arm comprises a flexible pipe, multiple joints and multiple groups of rope yarns, the neighboring joints are spherical surface contact, the flexible pipe passes through all of the joints, the rope yarns pass through all of the joints, and the rope yarns are uniformly distributed along a circumference concentrically installed withthe joints, two rope yarns in one group are arranged at two ends of a diameter of the circumference, an end part of one end of the rope yarn is fixedly connected with the joint at a tail end of the mechanical arm, and the other end passes through the mechanical arm support; a bending mechanism, wherein the bending mechanism comprises multiple rotatable turntables installed on the bottom plate, two rope yarns in one group are fixedly connected with the same turntable after passing through the mechanical arm support, the turntable is rotated so that one rope yarn can be retracted and the otherrope yarn can be released at the same time; and a rigid rod, wherein the rigid rod can be stretched into or stretched out of the flexible pipe, so rigidity of the mechanical arm is changed. The robotis capable of providing rigid support to the mechanical arm, and avoiding a human body from being injured.