Caenorhabditis elegans is an ideal model animal in genetic engineering, neural science, and developmental biology. Worm immobilization is an essential step in many operations, such as microsurgeries and fluorescent imaging, yet little has been done. To this end, an immobilization technique based on the combinative use of an optoelectric device and a thermos-reversible hydrogel, Pluronic F-127, was developed in this study. The optoelectric device was coated with a photoconductive layer, allowing local circuit channels to be rapidly switched by optical illumination. The hydrogel sandwiched in the device could reach gelation within 4 s. Notably, the gelation spot was defined by the light. The immobilized C. elegans appeared to resume its full locomotion within 3 s after the light was switched off. The technique was eventually used to assist the evaluation of senescence process of the RW1596 strain. A serial sarcomere images from the same batch of worms taken at different developmental stages showed progressive muscl e degeneration. This rapid and reversible immobilization technique provides insight to realize more worm-based applications, such as drug assays, that require long-term and constant monitoring.